<!doctype html><html lang="en">
 <head>
  <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  <title>CSS Animations Level 2</title>
  <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
  <meta content="exploring" name="csswg-work-status">
  <meta content="ED" name="w3c-status">
  <meta content="This CSS module describes a way for authors to animate the values of CSS properties over time, using keyframes. The behavior of these keyframe animations can be controlled by specifying their duration, number of repeats, and repeating behavior." name="abstract">
  <link href="../default.css" rel="stylesheet" type="text/css">
  <link href="../csslogo.ico" rel="shortcut icon" type="image/x-icon">
<style>
  body {
    background: url("https://www.w3.org/StyleSheets/TR/logo-ED") top left no-repeat;
  }
  </style>
  <link href="https://drafts.csswg.org/css-animations-2/" rel="canonical">
<style type="text/css">
  table.play-state-transitions {
    empty-cells: hide;
    border-spacing: 0px;
  }
  table.play-state-transitions td {
    padding: 0.2em 1em;
    border: 1px solid black;
  }
  table.play-state-transitions th {
    text-align: center;
  }
  table.play-state-transitions th.rowgroup {
    transform: rotate(-180deg);
    writing-mode: vertical-lr;
    padding-left: 5px;
  }

  table.event-state-transitions {
    width: 100%;
    border-spacing: 0px;
    border-collapse: collapse;
  }
  table.event-state-transitions th:first-child {
    width: 30%;
  }
  table.event-state-transitions th {
    text-align: center;
  }
  table.event-state-transitions td {
    padding: 0.2em 1em;
    border: 1px solid black;
  }
</style>
<style>/* style-md-lists */

/* This is a weird hack for me not yet following the commonmark spec
   regarding paragraph and lists. */
[data-md] > :first-child {
    margin-top: 0;
}
[data-md] > :last-child {
    margin-bottom: 0;
}</style>
<style>/* style-selflinks */

.heading, .issue, .note, .example, li, dt {
    position: relative;
}
a.self-link {
    position: absolute;
    top: 0;
    left: calc(-1 * (3.5rem - 26px));
    width: calc(3.5rem - 26px);
    height: 2em;
    text-align: center;
    border: none;
    transition: opacity .2s;
    opacity: .5;
}
a.self-link:hover {
    opacity: 1;
}
.heading > a.self-link {
    font-size: 83%;
}
li > a.self-link {
    left: calc(-1 * (3.5rem - 26px) - 2em);
}
dfn > a.self-link {
    top: auto;
    left: auto;
    opacity: 0;
    width: 1.5em;
    height: 1.5em;
    background: gray;
    color: white;
    font-style: normal;
    transition: opacity .2s, background-color .2s, color .2s;
}
dfn:hover > a.self-link {
    opacity: 1;
}
dfn > a.self-link:hover {
    color: black;
}

a.self-link::before            { content: "¶"; }
.heading > a.self-link::before { content: "§"; }
dfn > a.self-link::before      { content: "#"; }</style>
<style>/* style-counters */

body {
    counter-reset: example figure issue;
}
.issue {
    counter-increment: issue;
}
.issue:not(.no-marker)::before {
    content: "Issue " counter(issue);
}

.example {
    counter-increment: example;
}
.example:not(.no-marker)::before {
    content: "Example " counter(example);
}
.invalid.example:not(.no-marker)::before,
.illegal.example:not(.no-marker)::before {
    content: "Invalid Example" counter(example);
}

figcaption {
    counter-increment: figure;
}
figcaption:not(.no-marker)::before {
    content: "Figure " counter(figure) " ";
}</style>
<style>/* style-autolinks */

.css.css, .property.property, .descriptor.descriptor {
    color: #005a9c;
    font-size: inherit;
    font-family: inherit;
}
.css::before, .property::before, .descriptor::before {
    content: "‘";
}
.css::after, .property::after, .descriptor::after {
    content: "’";
}
.property, .descriptor {
    /* Don't wrap property and descriptor names */
    white-space: nowrap;
}
.type { /* CSS value <type> */
    font-style: italic;
}
pre .property::before, pre .property::after {
    content: "";
}
[data-link-type="property"]::before,
[data-link-type="propdesc"]::before,
[data-link-type="descriptor"]::before,
[data-link-type="value"]::before,
[data-link-type="function"]::before,
[data-link-type="at-rule"]::before,
[data-link-type="selector"]::before,
[data-link-type="maybe"]::before {
    content: "‘";
}
[data-link-type="property"]::after,
[data-link-type="propdesc"]::after,
[data-link-type="descriptor"]::after,
[data-link-type="value"]::after,
[data-link-type="function"]::after,
[data-link-type="at-rule"]::after,
[data-link-type="selector"]::after,
[data-link-type="maybe"]::after {
    content: "’";
}

[data-link-type].production::before,
[data-link-type].production::after,
.prod [data-link-type]::before,
.prod [data-link-type]::after {
    content: "";
}

[data-link-type=element],
[data-link-type=element-attr] {
    font-family: Menlo, Consolas, "DejaVu Sans Mono", monospace;
    font-size: .9em;
}
[data-link-type=element]::before { content: "<" }
[data-link-type=element]::after  { content: ">" }

[data-link-type=biblio] {
    white-space: pre;
}</style>
<style>/* style-dfn-panel */

.dfn-panel {
    position: absolute;
    z-index: 35;
    height: auto;
    width: -webkit-fit-content;
    width: fit-content;
    max-width: 300px;
    max-height: 500px;
    overflow: auto;
    padding: 0.5em 0.75em;
    font: small Helvetica Neue, sans-serif, Droid Sans Fallback;
    background: #DDDDDD;
    color: black;
    border: outset 0.2em;
}
.dfn-panel:not(.on) { display: none; }
.dfn-panel * { margin: 0; padding: 0; text-indent: 0; }
.dfn-panel > b { display: block; }
.dfn-panel a { color: black; }
.dfn-panel a:not(:hover) { text-decoration: none !important; border-bottom: none !important; }
.dfn-panel > b + b { margin-top: 0.25em; }
.dfn-panel ul { padding: 0; }
.dfn-panel li { list-style: inside; }
.dfn-panel.activated {
    display: inline-block;
    position: fixed;
    left: .5em;
    bottom: 2em;
    margin: 0 auto;
    max-width: calc(100vw - 1.5em - .4em - .5em);
    max-height: 30vh;
}

.dfn-paneled { cursor: pointer; }
</style>
<style>/* style-syntax-highlighting */
pre.idl.highlight { color: #708090; }
.highlight:not(.idl) { background: hsl(24, 20%, 95%); }
code.highlight { padding: .1em; border-radius: .3em; }
pre.highlight, pre > code.highlight { display: block; padding: 1em; margin: .5em 0; overflow: auto; border-radius: 0; }
c-[a] { color: #990055 } /* Keyword.Declaration */
c-[b] { color: #990055 } /* Keyword.Type */
c-[c] { color: #708090 } /* Comment */
c-[d] { color: #708090 } /* Comment.Multiline */
c-[e] { color: #0077aa } /* Name.Attribute */
c-[f] { color: #669900 } /* Name.Tag */
c-[g] { color: #222222 } /* Name.Variable */
c-[k] { color: #990055 } /* Keyword */
c-[l] { color: #000000 } /* Literal */
c-[m] { color: #000000 } /* Literal.Number */
c-[n] { color: #0077aa } /* Name */
c-[o] { color: #999999 } /* Operator */
c-[p] { color: #999999 } /* Punctuation */
c-[s] { color: #a67f59 } /* Literal.String */
c-[t] { color: #a67f59 } /* Literal.String.Single */
c-[u] { color: #a67f59 } /* Literal.String.Double */
c-[cp] { color: #708090 } /* Comment.Preproc */
c-[c1] { color: #708090 } /* Comment.Single */
c-[cs] { color: #708090 } /* Comment.Special */
c-[kc] { color: #990055 } /* Keyword.Constant */
c-[kn] { color: #990055 } /* Keyword.Namespace */
c-[kp] { color: #990055 } /* Keyword.Pseudo */
c-[kr] { color: #990055 } /* Keyword.Reserved */
c-[ld] { color: #000000 } /* Literal.Date */
c-[nc] { color: #0077aa } /* Name.Class */
c-[no] { color: #0077aa } /* Name.Constant */
c-[nd] { color: #0077aa } /* Name.Decorator */
c-[ni] { color: #0077aa } /* Name.Entity */
c-[ne] { color: #0077aa } /* Name.Exception */
c-[nf] { color: #0077aa } /* Name.Function */
c-[nl] { color: #0077aa } /* Name.Label */
c-[nn] { color: #0077aa } /* Name.Namespace */
c-[py] { color: #0077aa } /* Name.Property */
c-[ow] { color: #999999 } /* Operator.Word */
c-[mb] { color: #000000 } /* Literal.Number.Bin */
c-[mf] { color: #000000 } /* Literal.Number.Float */
c-[mh] { color: #000000 } /* Literal.Number.Hex */
c-[mi] { color: #000000 } /* Literal.Number.Integer */
c-[mo] { color: #000000 } /* Literal.Number.Oct */
c-[sb] { color: #a67f59 } /* Literal.String.Backtick */
c-[sc] { color: #a67f59 } /* Literal.String.Char */
c-[sd] { color: #a67f59 } /* Literal.String.Doc */
c-[se] { color: #a67f59 } /* Literal.String.Escape */
c-[sh] { color: #a67f59 } /* Literal.String.Heredoc */
c-[si] { color: #a67f59 } /* Literal.String.Interpol */
c-[sx] { color: #a67f59 } /* Literal.String.Other */
c-[sr] { color: #a67f59 } /* Literal.String.Regex */
c-[ss] { color: #a67f59 } /* Literal.String.Symbol */
c-[vc] { color: #0077aa } /* Name.Variable.Class */
c-[vg] { color: #0077aa } /* Name.Variable.Global */
c-[vi] { color: #0077aa } /* Name.Variable.Instance */
c-[il] { color: #000000 } /* Literal.Number.Integer.Long */
</style>
 <body class="h-entry">
  <div class="head">
   <p data-fill-with="logo"><a class="logo" href="https://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2016/logos/W3C" width="72"> </a> </p>
   <h1 class="p-name no-ref" id="title">CSS Animations Level 2</h1>
   <h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="1970-01-01">1 January 1970</time></span></h2>
   <details>
    <summary>Specification Metadata</summary>
    <div data-fill-with="spec-metadata">
     <dl>
      <dt>This version:
      <dd><a class="u-url" href="https://drafts.csswg.org/css-animations-2/">https://drafts.csswg.org/css-animations-2/</a>
      <dt class="editor">Editors:
      <dd class="editor p-author h-card vcard" data-editor-id="15393"><a class="p-name fn u-url url" href="https://dbaron.org/">L. David Baron</a> (<a class="p-org org" href="https://www.mozilla.org/">Mozilla</a>)
      <dd class="editor p-author h-card vcard" data-editor-id="43194"><a class="p-name fn u-email email" href="mailto:bbirtles@mozilla.com">Brian Birtles</a> (<a class="p-org org" href="https://www.mozilla.org/">Mozilla</a>)
      <dt>Suggest an Edit for this Spec:
      <dd><a href="https://github.com/w3c/csswg-drafts/blob/master/css-animations-2-2/Overview.bs">GitHub Editor</a>
      <dt>Issue Tracking:
      <dd><a href="https://github.com/w3c/csswg-drafts/labels/css-animations-2-2">GitHub Issues</a>
      <dt>Issues List:
      <dd><a href="https://www.w3.org/Bugs/Public/buglist.cgi?component=Animations&amp;list_id=36653&amp;product=CSS&amp;query_format=advanced&amp;resolution=---">In Bugzilla</a>
      <dd>
     </dl>
    </div>
   </details>
   <div data-fill-with="warning"></div>
   <p class="copyright" data-fill-with="copyright"><a href="https://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 1970 <a href="https://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href="https://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="https://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href="https://www.keio.ac.jp/">Keio</a>, <a href="https://ev.buaa.edu.cn/">Beihang</a>). W3C <a href="https://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="https://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document">permissive document license</a> rules apply. </p>
   <hr title="Separator for header">
  </div>
  <div class="p-summary" data-fill-with="abstract">
   <h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="content">Abstract</span></h2>
   <p>This CSS module describes a way for authors to animate the values of CSS properties over time, using keyframes. The behavior of these keyframe animations can be controlled by specifying their duration, number of repeats, and repeating behavior.</p>
    <a href="https://www.w3.org/TR/CSS/">CSS</a> is a language for describing the rendering of structured documents
(such as HTML and XML)
on screen, on paper, etc. 
  </div>
  <h2 class="no-num no-toc no-ref heading settled" id="status"><span class="content">Status of this document</span></h2>
  <div data-fill-with="status">
   <p> This is a public copy of the editors’ draft.
	It is provided for discussion only and may change at any moment.
	Its publication here does not imply endorsement of its contents by W3C.
	Don’t cite this document other than as work in progress. </p>
   <p> <a href="https://github.com/w3c/csswg-drafts/issues">GitHub Issues</a> are preferred for discussion of this specification.
	When filing an issue, please put the text “css-animations-2” in the title,
	preferably like this:
	“[css-animations-2] <i data-lt>…summary of comment…</i>”.
	All issues and comments are <a href="https://lists.w3.org/Archives/Public/public-css-archive/">archived</a>,
	and there is also a <a href="https://lists.w3.org/Archives/Public/www-style/">historical archive</a>. </p>
   <p> This document was produced by the <a href="https://www.w3.org/Style/CSS/">CSS Working Group</a>. </p>
   <p> This document was produced by a group operating under
	the <a href="https://www.w3.org/Consortium/Patent-Policy/">W3C Patent Policy</a>.
	W3C maintains a <a href="https://www.w3.org/2004/01/pp-impl/32061/status" rel="disclosure">public list of any patent disclosures</a> made in connection with the deliverables of the group;
	that page also includes instructions for disclosing a patent.
	An individual who has actual knowledge of a patent which the individual believes contains <a href="https://www.w3.org/Consortium/Patent-Policy/#def-essential">Essential Claim(s)</a> must disclose the information in accordance with <a href="https://www.w3.org/Consortium/Patent-Policy/#sec-Disclosure">section 6 of the W3C Patent Policy</a>. </p>
   <p> This document is governed by the <a href="https://www.w3.org/2019/Process-20190301/" id="w3c_process_revision">1 March 2019 W3C Process Document</a>. </p>
   <p></p>
  </div>
  <div data-fill-with="at-risk"></div>
  <nav data-fill-with="table-of-contents" id="toc">
   <h2 class="no-num no-toc no-ref" id="contents">Table of Contents</h2>
   <ol class="toc" role="directory">
    <li><a href="#delta"><span class="secno">1</span> <span class="content">Delta specification</span></a>
    <li>
     <a href="#animations"><span class="secno">2</span> <span class="content">Animations</span></a>
     <ol class="toc">
      <li><a href="#owning-element-section"><span class="secno">2.1</span> <span class="content">Owning element</span></a>
      <li><a href="#animation-composite-order"><span class="secno">2.2</span> <span class="content">Animation composite order</span></a>
     </ol>
    <li>
     <a href="#keyframes"><span class="secno">3</span> <span class="content">Keyframes</span></a>
     <ol class="toc">
      <li>
       <a href="#animation-play-state"><span class="secno">3.1</span> <span class="content">The <span class="property">animation-play-state</span> property</span></a>
       <ol class="toc">
        <li><a href="#interaction-between-animation-play-state-and-web-animations-API"><span class="secno">3.1.1</span> <span class="content">Interaction between <span class="property">animation-play-state</span> and the Web Animations API</span></a>
       </ol>
      <li><a href="#animation-composition"><span class="secno">3.2</span> <span class="content">The <span class="property">animation-composition</span> property</span></a>
     </ol>
    <li>
     <a href="#events"><span class="secno">4</span> <span class="content">Animation Events</span></a>
     <ol class="toc">
      <li><a href="#event-dispatch"><span class="secno">4.1</span> <span class="content">Event dispatch</span></a>
     </ol>
    <li>
     <a href="#interface-dom"><span class="secno">5</span> <span class="content">DOM Interfaces</span></a>
     <ol class="toc">
      <li><a href="#the-CSSAnimation-interface"><span class="secno">5.1</span> <span class="content">The CSSAnimation interface</span></a>
      <li><a href="#requirements-on-pending-style-changes"><span class="secno">5.2</span> <span class="content">Requirements on pending style changes</span></a>
     </ol>
    <li><a href="#priv-sec"><span class="secno">6</span> <span class="content"> Privacy and Security Considerations</span></a>
    <li>
     <a href="#conformance"><span class="secno"></span> <span class="content"> Conformance</span></a>
     <ol class="toc">
      <li><a href="#document-conventions"><span class="secno"></span> <span class="content"> Document conventions</span></a>
      <li><a href="#conform-classes"><span class="secno"></span> <span class="content"> Conformance classes</span></a>
      <li>
       <a href="#conform-responsible"><span class="secno"></span> <span class="content"> Requirements for Responsible Implementation of CSS</span></a>
       <ol class="toc">
        <li><a href="#conform-partial"><span class="secno"></span> <span class="content"> Partial Implementations</span></a>
        <li><a href="#conform-future-proofing"><span class="secno"></span> <span class="content"> Implementations of Unstable and Proprietary Features</span></a>
        <li><a href="#conform-testing"><span class="secno"></span> <span class="content"> Implementations of CR-level Features</span></a>
       </ol>
     </ol>
    <li>
     <a href="#index"><span class="secno"></span> <span class="content">Index</span></a>
     <ol class="toc">
      <li><a href="#index-defined-here"><span class="secno"></span> <span class="content">Terms defined by this specification</span></a>
      <li><a href="#index-defined-elsewhere"><span class="secno"></span> <span class="content">Terms defined by reference</span></a>
     </ol>
    <li>
     <a href="#references"><span class="secno"></span> <span class="content">References</span></a>
     <ol class="toc">
      <li><a href="#normative"><span class="secno"></span> <span class="content">Normative References</span></a>
      <li><a href="#informative"><span class="secno"></span> <span class="content">Informative References</span></a>
     </ol>
    <li><a href="#property-index"><span class="secno"></span> <span class="content">Property Index</span></a>
    <li><a href="#idl-index"><span class="secno"></span> <span class="content">IDL Index</span></a>
    <li><a href="#issues-index"><span class="secno"></span> <span class="content">Issues Index</span></a>
   </ol>
  </nav>
  <main>
   <h2 class="heading settled" data-level="1" id="delta"><span class="secno">1. </span><span class="content">Delta specification</span><a class="self-link" href="#delta"></a></h2>
   <p>This is a delta specification, meaning that it currently contains
only the differences from CSS Animations Level 1 <a data-link-type="biblio" href="#biblio-css3-animations">[CSS3-ANIMATIONS]</a>.
Once the Level 1 specification is closer to complete, it will be merged
with the additions here into a complete level 2 specification.</p>
   <h2 class="heading settled" data-level="2" id="animations"><span class="secno">2. </span><span class="content">Animations</span><a class="self-link" href="#animations"></a></h2>
   <h3 class="heading settled" data-level="2.1" id="owning-element-section"><span class="secno">2.1. </span><span class="content">Owning element</span><a class="self-link" href="#owning-element-section"></a></h3>
   <p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="owning-element">owning element</dfn> of an animation refers to the element or
pseudo-element to which the <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-animations-1/#propdef-animation-name" id="ref-for-propdef-animation-name">animation-name</a> property was applied that generated
the animation.</p>
   <p>If an animation was generated directly by script (e.g. using
the <code class="idl"><a data-link-type="idl" href="#cssanimation" id="ref-for-cssanimation">CSSAnimation</a></code> constructor) then it has no <a data-link-type="dfn" href="#owning-element" id="ref-for-owning-element">owning element</a>.</p>
   <p>If an animation generated using the markup defined in this specification is
later disassociated from that markup by an update to the computed value of the <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-animations-1/#propdef-animation-name" id="ref-for-propdef-animation-name①">animation-name</a> property on the <a data-link-type="dfn" href="#owning-element" id="ref-for-owning-element①">owning element</a>, the animation is
disassociated from its <span id="ref-for-owning-element②">owning element</span> (that is, it has no <span id="ref-for-owning-element③">owning
element</span> from that point forwards).</p>
   <div class="note" role="note">
    <p>In the example below, <code>animation</code>’s initial <a data-link-type="dfn" href="#owning-element" id="ref-for-owning-element④">owning element</a> is <code>elem</code>. <code>animation</code> is disassociated from <code>element</code> through an update to the computed value of <code>elem</code>’s <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-animations-1/#propdef-animation-name" id="ref-for-propdef-animation-name②">animation-name</a> property.</p>
<pre class="example lang-javascript highlight" id="example-da754a87"><a class="self-link" href="#example-da754a87"></a>elem<c- p>.</c->style<c- p>.</c->animation <c- o>=</c-> <c- t>'spin 1s'</c-><c- p>;</c->
<c- a>let</c-> animation <c- o>=</c-> elem<c- p>.</c->getAnimations<c- p>()[</c-><c- mi>0</c-><c- p>];</c-> <c- c1>// animation’s owning element is elem</c->
elem<c- p>.</c->style<c- p>.</c->animation <c- o>=</c-> <c- t>''</c-><c- p>;</c-> <c- c1>// animation no longer has an owning element</c->
</pre>
    <p>Note that although the <a data-link-type="dfn" href="#owning-element" id="ref-for-owning-element⑤">owning element</a> is often equal to the <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#target-element" id="ref-for-target-element">target
element</a> of an animation’s <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#target-effect" id="ref-for-target-effect">target effect</a>, this is not always the case.
The following example demonstrates some of the situations where these two
elements may differ.</p>
<pre class="example lang-javascript highlight" id="example-fcf999b3"><a class="self-link" href="#example-fcf999b3"></a>elem<c- p>.</c->style<c- p>.</c->animation <c- o>=</c-> <c- t>'move 1s'</c-><c- p>;</c->
<c- a>let</c-> animation <c- o>=</c-> elem<c- p>.</c->getAnimations<c- p>()[</c-><c- mi>0</c-><c- p>];</c->
<c- c1>// animation.effect.target == elem == animation’s owning element</c->

<c- a>let</c-> mutableEffect <c- o>=</c-> animation<c- p>.</c->effect<c- p>.</c->clone<c- p>();</c->
animation<c- p>.</c->effect <c- o>=</c-> mutableEffect<c- p>;</c->
animation<c- p>.</c->effect<c- p>.</c->target <c- o>=</c-> elem2<c- p>;</c->
<c- c1>// animation.effect.target == elem2 != animation’s owning element</c->

animation<c- p>.</c->effect <c- o>=</c-> <c- kc>null</c-><c- p>;</c->
<c- c1>// animation.effect.target is undefined != animation’s owning element</c->
</pre>
   </div>
   <h3 class="heading settled" data-level="2.2" id="animation-composite-order"><span class="secno">2.2. </span><span class="content">Animation composite order</span><a class="self-link" href="#animation-composite-order"></a></h3>
   <p><a data-link-type="dfn" href="https://w3c.github.io/web-animations/#animation" id="ref-for-animation">Animations</a> generated from the markup or interfaces
(e.g. the <code class="idl"><a data-link-type="idl" href="#cssanimation" id="ref-for-cssanimation①">CSSAnimation</a></code> constructor) defined in this specification have an <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#animation-class" id="ref-for-animation-class">animation class</a> of ‘CSS Animation’.</p>
   <p>CSS Animations <em>with</em> an <a data-link-type="dfn" href="#owning-element" id="ref-for-owning-element⑥">owning element</a> have a <em>later</em> composite order than CSS Transitions but an <em>earlier</em> composite order
than animations without a specific <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#animation-class" id="ref-for-animation-class①">animation class</a>.</p>
   <p>Within the set of CSS Animations <em>with</em> an <a data-link-type="dfn" href="#owning-element" id="ref-for-owning-element⑦">owning element</a>, two
animations <var>A</var> and <var>B</var> are sorted in composite order (first to
last) as follows:</p>
   <ol>
    <li data-md>
     <p>If the <a data-link-type="dfn" href="#owning-element" id="ref-for-owning-element⑧">owning element</a> of <var>A</var> and <var>B</var> differs, sort <var>A</var> and <var>B</var> by <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-tree-order" id="ref-for-concept-tree-order">tree order</a> of their corresponding <span id="ref-for-owning-element⑨">owning elements</span>.
With regard to pseudo-elements, the sort order is as follows:</p>
     <ul>
      <li data-md>
       <p>element</p>
      <li data-md>
       <p>::marker</p>
      <li data-md>
       <p>::before</p>
      <li data-md>
       <p>::after</p>
      <li data-md>
       <p>element children</p>
     </ul>
    <li data-md>
     <p>Otherwise, sort <var>A</var> and <var>B</var> based on their position in the
computed value of the <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-animations-1/#propdef-animation-name" id="ref-for-propdef-animation-name③">animation-name</a> property of the (common) <a data-link-type="dfn" href="#owning-element" id="ref-for-owning-element①⓪">owning
element</a>.</p>
   </ol>
   <p>The composite order of CSS Animations <em>without</em> an <a data-link-type="dfn" href="#owning-element" id="ref-for-owning-element①①">owning element</a> is based on their position in the <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#global-animation-list" id="ref-for-global-animation-list">global animation list</a>.</p>
   <p class="issue" id="issue-f7fefefa"><a class="self-link" href="#issue-f7fefefa"></a> This differs from the behavior defined for transitions. We should
probably sort transitions first, then animation, then use the global animation
list. The reason being that when developer tools etc. hang on to orphaned
animations and transitions in order to replay them, they should maintain
roughly the same composite order.</p>
   <p>CSS Animations generated using the markup defined in this specification are <em>not</em> added to the <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#global-animation-list" id="ref-for-global-animation-list①">global animation list</a> when they are created.
Instead, these animations are appended to the <span id="ref-for-global-animation-list②">global animation list</span> at
the first moment when they transition out of the <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#idle-play-state" id="ref-for-idle-play-state">idle play state</a> after
being disassociated from their <a data-link-type="dfn" href="#owning-element" id="ref-for-owning-element①②">owning element</a>.
CSS Animations that have been disassociated from their <span id="ref-for-owning-element①③">owning element</span> but are still <span id="ref-for-idle-play-state①">idle</span> do not have a defined
composite order.</p>
   <p class="note" role="note"><span>Note,</span> this behavior relies on the fact that disassociating an animation
from its <a data-link-type="dfn" href="#owning-element" id="ref-for-owning-element①④">owning element</a> always causes it to enter (or remain) in the <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#idle-play-state" id="ref-for-idle-play-state②">idle play state</a>.</p>
   <p>CSS Animations created using the <code class="idl"><a data-link-type="idl" href="#cssanimation" id="ref-for-cssanimation②">CSSAnimation</a></code> constructor are appended
to the <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#global-animation-list" id="ref-for-global-animation-list③">global animation list</a> at the moment they are constructed.</p>
   <h2 class="heading settled" data-level="3" id="keyframes"><span class="secno">3. </span><span class="content">Keyframes</span><a class="self-link" href="#keyframes"></a></h2>
   <h3 class="heading settled" data-level="3.1" id="animation-play-state"><span class="secno">3.1. </span><span class="content">The <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-animations-1/#propdef-animation-play-state" id="ref-for-propdef-animation-play-state">animation-play-state</a> property</span><a class="self-link" href="#animation-play-state"></a></h3>
   <h4 class="heading settled" data-level="3.1.1" id="interaction-between-animation-play-state-and-web-animations-API"><span class="secno">3.1.1. </span><span class="content">Interaction between <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-animations-1/#propdef-animation-play-state" id="ref-for-propdef-animation-play-state①">animation-play-state</a> and the Web Animations API</span><a class="self-link" href="#interaction-between-animation-play-state-and-web-animations-API"></a></h4>
   <p>Both this specification and the Web Animations specification <a data-link-type="biblio" href="#biblio-web-animations">[WEB-ANIMATIONS]</a> define mechanisms for pause control, specifically the <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-animations-1/#propdef-animation-play-state" id="ref-for-propdef-animation-play-state②">animation-play-state</a> property, and the <code class="idl"><a data-link-type="idl" href="https://w3c.github.io/web-animations/#play" id="ref-for-play">play()</a></code> and <code class="idl"><a data-link-type="idl" href="https://w3c.github.io/web-animations/#pause" id="ref-for-pause">pause()</a></code> methods
respectively.</p>
   <div class="note" role="note">
    <p>The interaction of these methods can be summarized as follows:</p>
    <ul>
     <li data-md>
      <p>Calling <code class="idl"><a data-link-type="idl" href="https://w3c.github.io/web-animations/#pause" id="ref-for-pause①">pause()</a></code> is sticky. The animation will remain paused
until there is a subsequent call to <code class="idl"><a data-link-type="idl" href="https://w3c.github.io/web-animations/#play" id="ref-for-play①">play()</a></code> after which point
the animation will begin tracking changes to the computed value of the <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-animations-1/#propdef-animation-play-state" id="ref-for-propdef-animation-play-state③">animation-play-state</a> property on the <a data-link-type="dfn" href="#owning-element" id="ref-for-owning-element①⑤">owning element</a> from the next
moment it becomes newly <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-animations-1/#valdef-animation-play-state-paused" id="ref-for-valdef-animation-play-state-paused">paused</a>.</p>
     <li data-md>
      <p>If the computed <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-animations-1/#propdef-animation-play-state" id="ref-for-propdef-animation-play-state④">animation-play-state</a> on the <a data-link-type="dfn" href="#owning-element" id="ref-for-owning-element①⑥">owning element</a> is <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-animations-1/#valdef-animation-play-state-paused" id="ref-for-valdef-animation-play-state-paused①">paused</a>, calling <code class="idl"><a data-link-type="idl" href="https://w3c.github.io/web-animations/#play" id="ref-for-play②">play()</a></code> will temporarily override the <span class="property" id="ref-for-propdef-animation-play-state⑤">animation-play-state</span> until it next becomes <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-animations-1/#valdef-animation-play-state-running" id="ref-for-valdef-animation-play-state-running">running</a>.</p>
    </ul>
   </div>
   <p>With regards to the pausing, an animation can be considered to be in one of
five mutually-exclusive states:</p>
   <ul style="list-style-type: upper-latin">
    <li>Running 
    <li>Running and temporarily overriding <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-animations-1/#propdef-animation-play-state" id="ref-for-propdef-animation-play-state⑥">animation-play-state</a>: <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-animations-1/#valdef-animation-play-state-paused" id="ref-for-valdef-animation-play-state-paused②">paused</a> 
    <li>Paused and sticky overriding <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-animations-1/#propdef-animation-play-state" id="ref-for-propdef-animation-play-state⑦">animation-play-state</a>: <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-animations-1/#valdef-animation-play-state-running" id="ref-for-valdef-animation-play-state-running①">running</a> 
    <li>Paused and sticky overriding <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-animations-1/#propdef-animation-play-state" id="ref-for-propdef-animation-play-state⑧">animation-play-state</a>: <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-animations-1/#valdef-animation-play-state-paused" id="ref-for-valdef-animation-play-state-paused③">paused</a> 
    <li>Paused by <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-animations-1/#propdef-animation-play-state" id="ref-for-propdef-animation-play-state⑨">animation-play-state</a> 
   </ul>
   <p>A state transition chart follows:</p>
   <table class="play-state-transitions">
    <tbody>
     <tr>
      <td rowspan="2">
      <td>
      <th colspan="5">Initial state
     <tr>
      <th>Event
      <th>A
      <th>B
      <th>C
      <th>D
      <th>E
     <tr>
      <th class="rowgroup" rowspan="4">Resulting state
      <td><code class="idl"><a data-link-type="idl" href="https://w3c.github.io/web-animations/#play" id="ref-for-play③">play()</a></code>
      <td>A
      <td>B
      <td>A
      <td>B
      <td>B
     <tr>
      <td><code class="idl"><a data-link-type="idl" href="https://w3c.github.io/web-animations/#pause" id="ref-for-pause②">pause()</a></code>
      <td>C
      <td>D
      <td>C
      <td>D
      <td>D
     <tr>
      <td><a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-animations-1/#propdef-animation-play-state" id="ref-for-propdef-animation-play-state①⓪">animation-play-state</a> → <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-animations-1/#valdef-animation-play-state-running" id="ref-for-valdef-animation-play-state-running②">running</a>
      <td>A
      <td>A
      <td>C
      <td>C
      <td>A
     <tr>
      <td><a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-animations-1/#propdef-animation-play-state" id="ref-for-propdef-animation-play-state①①">animation-play-state</a> → <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-animations-1/#valdef-animation-play-state-paused" id="ref-for-valdef-animation-play-state-paused④">paused</a>
      <td>E
      <td>B
      <td>D
      <td>D
      <td>E
   </table>
   <p>If any change causes an animation to change from  one of the running states (A,
B) to one of the paused states (C, D, E), the user agent must run the <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#pause-an-animation" id="ref-for-pause-an-animation">pause
an animation</a> procedure on the animation.</p>
   <p>Likewise, for any change from one of the the paused states to one of the
running states, the user agent must run the <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#play-an-animation" id="ref-for-play-an-animation">play an animation</a> procedure
on the animation. If the change is due to a change in the computed value of <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-animations-1/#propdef-animation-play-state" id="ref-for-propdef-animation-play-state①②">animation-play-state</a> (i.e. the transition E → A) the <var>auto-rewind</var> flag for that procedure must be set to false; otherwise
it must be set to true.</p>
   <h3 class="heading settled" data-level="3.2" id="animation-composition"><span class="secno">3.2. </span><span class="content">The <a class="property" data-link-type="propdesc" href="#propdef-animation-composition" id="ref-for-propdef-animation-composition">animation-composition</a> property</span><a class="self-link" href="#animation-composition"></a></h3>
   <p>The <a class="property" data-link-type="propdesc" href="#propdef-animation-composition" id="ref-for-propdef-animation-composition①">animation-composition</a> property defines the <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#composite-operation" id="ref-for-composite-operation">composite operation</a> used when multiple animations affect the same property simultaneously.</p>
   <table class="def propdef" data-link-for-hint="animation-composition">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-animation-composition">animation-composition</dfn>
     <tr class="value">
      <th><a href="https://drafts.csswg.org/css-values/#value-defs">Value:</a>
      <td class="prod"><a class="production css" data-link-type="type" href="#typedef-single-animation-composition" id="ref-for-typedef-single-animation-composition">&lt;single-animation-composition></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-comma" id="ref-for-mult-comma">#</a>
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#initial-values">Initial:</a>
      <td>replace
     <tr>
      <th>Applies to:
      <td><a href="https://drafts.csswg.org/css-pseudo/#generated-content" title="Includes ::before and ::after pseudo-elements.">all elements</a>
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#inherited-property">Inherited:</a>
      <td>no
     <tr>
      <th><a href="https://drafts.csswg.org/css-values/#percentages">Percentages:</a>
      <td>N/A
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#computed">Computed value:</a>
      <td>list, each item a keyword as specified
     <tr>
      <th>Canonical order:
      <td>per grammar
     <tr>
      <th><a href="https://drafts.csswg.org/web-animations/#animation-type">Animation type:</a>
      <td>not animatable
   </table>
   <p><dfn class="dfn-paneled css" data-dfn-type="type" data-export id="typedef-single-animation-composition">&lt;single-animation-composition></dfn> = replace | add | accumulate</p>
   <p>The values of <a class="property" data-link-type="propdesc" href="#propdef-animation-composition" id="ref-for-propdef-animation-composition②">animation-composition</a> have the meaning defined for the
corresponding values of the <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#composite-operation" id="ref-for-composite-operation①">composite operation</a> defined in Web
Animations <a data-link-type="biblio" href="#biblio-web-animations">[WEB-ANIMATIONS]</a>.</p>
   <p>When specified in a keyframe, <a class="property" data-link-type="propdesc" href="#propdef-animation-composition" id="ref-for-propdef-animation-composition③">animation-composition</a> defines the composite
operation to use for each property specified in that keyframe until the next
keyframe specifying each property.</p>
   <div class="example" id="example-662b2582">
    <a class="self-link" href="#example-662b2582"></a> For example, the following stylesheet defines two different animations
  targetting the <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-transforms-2/#propdef-scale" id="ref-for-propdef-scale">scale</a> property. 
<pre>@keyframes heartbeat {
  from {
    scale: 1;
    animation-timing-function: ease-out;
  }
  30% {
    scale: 1.3;
  }
}
.heartbeat {
  animation: heartbeat 0.3s 2s infinite;
}

@keyframes throb {
  50% {
    scale: 1.8;
  }
}
.icon:mouseover {
  animation: throb 0.4s add;
}
</pre>
    <p>If these two animations are applied to the same element, normally only
  one animation would apply, but by specifying <a class="css" data-link-type="maybe" href="https://drafts.fxtf.org/css-masking-1/#valdef-mask-composite-add" id="ref-for-valdef-mask-composite-add">add</a> as the <a class="property" data-link-type="propdesc" href="#propdef-animation-composition" id="ref-for-propdef-animation-composition④">animation-composition</a> on the second animation, the result of the two
  animations will be combined.</p>
    <p>Since CSS Transitions <a data-link-type="biblio" href="#biblio-css3-transitions">[CSS3-TRANSITIONS]</a> have a lower composite
  order, it is possible to use <a class="property" data-link-type="propdesc" href="#propdef-animation-composition" id="ref-for-propdef-animation-composition⑤">animation-composition</a> to combine CSS
  Animations with underlying transitions as in the following example.</p>
<pre>.icon {
  filter: blur(20px);
  transition: filter 0.5s;
}
.icon:hover {
  filter: blur(0px);
  animation: brightness-pulse 3s infinite add;
}

@keyframes pulse {
  0% {
    scale: 1.1;
    filter: brightness(130%);
  }
  10% {
    scale: 1;
    filter: brightness(100%);
  }
}
</pre>
    <p class="issue" id="issue-69776a9f"><a class="self-link" href="#issue-69776a9f"></a> Create pictures of these examples and verify they make sense.</p>
   </div>
   <h2 class="heading settled" data-level="4" id="events"><span class="secno">4. </span><span class="content">Animation Events</span><a class="self-link" href="#events"></a></h2>
   <h3 class="heading settled" data-level="4.1" id="event-dispatch"><span class="secno">4.1. </span><span class="content">Event dispatch</span><a class="self-link" href="#event-dispatch"></a></h3>
   <p class="note" role="note"><span>Note,</span> this is a more general description of event dispatch than that of CSS
Animations Level 1 <a data-link-type="biblio" href="#biblio-css3-animations">[CSS3-ANIMATIONS]</a> since it must account for the
possibility of animations being seeked or reversed using the Web Animations API <a data-link-type="biblio" href="#biblio-web-animations">[WEB-ANIMATIONS]</a>.</p>
   <p>For the purpose of determining which events to dispatch, the <a href="https://www.w3.org/TR/web-animations-1/#animation-effect-phases-and-states">phases</a> defined in
the Web Animations model are used. These definitions apply to an <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#animation-effect" id="ref-for-animation-effect">animation
effect</a>, however, for the purpose of dispatching events, we consider a
CSS Animation to have the same phase as its <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#target-effect" id="ref-for-target-effect①">target effect</a>. For example,
a CSS Animation is in the <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#before-phase" id="ref-for-before-phase">before phase</a> if its <span id="ref-for-target-effect②">target effect</span> is in the <span id="ref-for-before-phase①">before phase</span>.</p>
   <p>A CSS Animation that does not have a <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#target-effect" id="ref-for-target-effect③">target effect</a> is considered to be in
the <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#idle-phase" id="ref-for-idle-phase">idle phase</a> if its <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#current-time" id="ref-for-current-time">current time</a> is <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#unresolved" id="ref-for-unresolved">unresolved</a>, in the <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#before-phase" id="ref-for-before-phase②">before phase</a> if its <span id="ref-for-current-time①">current time</span> is less than zero, and in the <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#after-phase" id="ref-for-after-phase">after phase</a> otherwise.</p>
   <p>Similarly, subsequent references to the <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#start-delay" id="ref-for-start-delay">start delay</a>, <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#active-duration" id="ref-for-active-duration">active
duration</a>, <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#current-iteration" id="ref-for-current-iteration">current iteration</a>, <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#iteration-start" id="ref-for-iteration-start">iteration start</a>, and <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#iteration-duration" id="ref-for-iteration-duration">iteration duration</a> of a CSS animation should be understood to refer
to the corresponding properties of the animation’s <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#target-effect" id="ref-for-target-effect④">target effect</a>.</p>
   <p>For calculating the <code class="idl"><a data-link-type="idl" href="https://drafts.csswg.org/css-animations-1/#dom-animationevent-elapsedtime" id="ref-for-dom-animationevent-elapsedtime">elapsedTime</a></code> of each event, the following
definitions are used:</p>
   <ul>
    <li data-md>
     <p><dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="interval-start">interval start</dfn> = <code>max(min(-<a data-link-type="dfn" href="https://w3c.github.io/web-animations/#start-delay" id="ref-for-start-delay①">start delay</a>, <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#active-duration" id="ref-for-active-duration①">active duration</a>), 0)</code></p>
    <li data-md>
     <p><dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="interval-end">interval end</dfn> = <code>max(min(<a data-link-type="dfn" href="https://w3c.github.io/web-animations/#target-effect-end" id="ref-for-target-effect-end">target effect end</a> - <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#start-delay" id="ref-for-start-delay②">start delay</a>, <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#active-duration" id="ref-for-active-duration②">active duration</a>), 0)</code></p>
   </ul>
   <p>Each time an animation is <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#sampling" id="ref-for-sampling">sampled</a> and is <em>not</em> <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#pending-play-state" id="ref-for-pending-play-state">pending</a>, the events to dispatch are determined by
comparing the animation’s phase before and after the sample as follows:</p>
   <table class="event-state-transitions">
    <thead>
     <tr>
      <th>Change
      <th>Events dispatched
      <th><dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="elapsed-time">Elapsed time</dfn> (ms)
    <tbody>
     <tr>
      <td><a data-link-type="dfn" href="https://w3c.github.io/web-animations/#idle-phase" id="ref-for-idle-phase①">idle</a> or <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#before-phase" id="ref-for-before-phase③">before</a> → <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#active-phase" id="ref-for-active-phase">active</a>
      <td><code class="idl"><a data-link-type="idl" href="https://drafts.csswg.org/css-animations-1/#eventdef-animationevent-animationstart" id="ref-for-eventdef-animationevent-animationstart">animationstart</a></code>
      <td><a data-link-type="dfn" href="#interval-start" id="ref-for-interval-start">interval start</a> 
     <tr>
      <td rowspan="2"> <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#idle-phase" id="ref-for-idle-phase②">idle</a> or <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#before-phase" id="ref-for-before-phase④">before</a> → <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#after-phase" id="ref-for-after-phase①">after</a> <a href="#multiple-events-note">٭</a>
      <td><code class="idl"><a data-link-type="idl" href="https://drafts.csswg.org/css-animations-1/#eventdef-animationevent-animationstart" id="ref-for-eventdef-animationevent-animationstart①">animationstart</a></code>
      <td><a data-link-type="dfn" href="#interval-start" id="ref-for-interval-start①">interval start</a> 
     <tr>
      <td><code class="idl"><a data-link-type="idl" href="https://drafts.csswg.org/css-animations-1/#eventdef-animationevent-animationend" id="ref-for-eventdef-animationevent-animationend">animationend</a></code>
      <td><a data-link-type="dfn" href="#interval-end" id="ref-for-interval-end">interval end</a> 
     <tr>
      <td><a data-link-type="dfn" href="https://w3c.github.io/web-animations/#active-phase" id="ref-for-active-phase①">active</a> → <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#before-phase" id="ref-for-before-phase⑤">before</a>
      <td><code class="idl"><a data-link-type="idl" href="https://drafts.csswg.org/css-animations-1/#eventdef-animationevent-animationend" id="ref-for-eventdef-animationevent-animationend①">animationend</a></code>
      <td><a data-link-type="dfn" href="#interval-start" id="ref-for-interval-start②">interval start</a>
     <tr>
      <td><a data-link-type="dfn" href="https://w3c.github.io/web-animations/#active-phase" id="ref-for-active-phase②">active</a> → <span id="ref-for-active-phase③">active</span> <em>and</em> the <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#current-iteration" id="ref-for-current-iteration①">current iteration</a> of the animation’s <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#target-effect" id="ref-for-target-effect⑤">target effect</a> has changed since the previous sample 
      <td><code class="idl"><a data-link-type="idl" href="https://drafts.csswg.org/css-animations-1/#eventdef-animationevent-animationiteration" id="ref-for-eventdef-animationevent-animationiteration">animationiteration</a></code>
      <td>(See below) <a href="#animation-iteration-elapsed-time">†</a>
     <tr>
      <td><a data-link-type="dfn" href="https://w3c.github.io/web-animations/#active-phase" id="ref-for-active-phase④">active</a> → <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#after-phase" id="ref-for-after-phase②">after</a>
      <td><code class="idl"><a data-link-type="idl" href="https://drafts.csswg.org/css-animations-1/#eventdef-animationevent-animationend" id="ref-for-eventdef-animationevent-animationend②">animationend</a></code>
      <td><a data-link-type="dfn" href="#interval-end" id="ref-for-interval-end①">interval end</a>
     <tr>
      <td><a data-link-type="dfn" href="https://w3c.github.io/web-animations/#after-phase" id="ref-for-after-phase③">after</a> → <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#active-phase" id="ref-for-active-phase⑤">active</a>
      <td><code class="idl"><a data-link-type="idl" href="https://drafts.csswg.org/css-animations-1/#eventdef-animationevent-animationstart" id="ref-for-eventdef-animationevent-animationstart②">animationstart</a></code>
      <td><a data-link-type="dfn" href="#interval-end" id="ref-for-interval-end②">interval end</a>
     <tr>
      <td rowspan="2"><a data-link-type="dfn" href="https://w3c.github.io/web-animations/#after-phase" id="ref-for-after-phase④">after</a> → <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#before-phase" id="ref-for-before-phase⑥">before</a> <a href="#multiple-events-note">٭</a>
      <td><code class="idl"><a data-link-type="idl" href="https://drafts.csswg.org/css-animations-1/#eventdef-animationevent-animationstart" id="ref-for-eventdef-animationevent-animationstart③">animationstart</a></code>
      <td><a data-link-type="dfn" href="#interval-end" id="ref-for-interval-end③">interval end</a>
     <tr>
      <td><code class="idl"><a data-link-type="idl" href="https://drafts.csswg.org/css-animations-1/#eventdef-animationevent-animationend" id="ref-for-eventdef-animationevent-animationend③">animationend</a></code>
      <td><a data-link-type="dfn" href="#interval-start" id="ref-for-interval-start③">interval start</a>
     <tr>
      <td><em>not</em> <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#idle-phase" id="ref-for-idle-phase③">idle</a> and <em>not</em> <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#after-phase" id="ref-for-after-phase⑤">after</a>→ <span id="ref-for-idle-phase④">idle</span>
      <td><code class="idl"><a data-link-type="idl" href="https://drafts.csswg.org/css-animations-1/#eventdef-animationevent-animationcancel" id="ref-for-eventdef-animationevent-animationcancel">animationcancel</a></code>
      <td>The <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#active-time" id="ref-for-active-time">active time</a> of the animation at the moment it was cancelled
          calculated using a <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#fill-mode" id="ref-for-fill-mode">fill mode</a> of both.
   </table>
   <p id="multiple-events-note">٭ Where multiple events are listed for
a state change, all events are dispatched in the order listed and in immediate
succession.</p>
   <p id="animation-iteration-elapsed-time">† The <a data-link-type="dfn" href="#elapsed-time" id="ref-for-elapsed-time">elapsed time</a> for
an <code class="idl"><a data-link-type="idl" href="https://drafts.csswg.org/css-animations-1/#eventdef-animationevent-animationiteration" id="ref-for-eventdef-animationevent-animationiteration①">animationiteration</a></code> event is defined as follows:</p>
   <ol>
    <li data-md>
     <p>Let <var>previous current iteration</var> be the <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#current-iteration" id="ref-for-current-iteration②">current iteration</a> from the previous sample.</p>
    <li data-md>
     <p>If <var>previous current iteration</var> is greater than <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#current-iteration" id="ref-for-current-iteration③">current
iteration</a>, let <var>iteration boundary</var> be <code><a data-link-type="dfn" href="https://w3c.github.io/web-animations/#current-iteration" id="ref-for-current-iteration④">current
iteration</a> + 1</code>, otherwise let it be <span id="ref-for-current-iteration⑤">current iteration</span>.</p>
    <li data-md>
     <p>The <a data-link-type="dfn" href="#elapsed-time" id="ref-for-elapsed-time①">elapsed time</a> is the result of evaluating <code>(<var>iteration boundary</var> - <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#iteration-start" id="ref-for-iteration-start①">iteration start</a>) × <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#iteration-duration" id="ref-for-iteration-duration①">iteration duration</a>)</code>.</p>
   </ol>
   <p>Since the <a data-link-type="dfn" href="#elapsed-time" id="ref-for-elapsed-time②">elapsed time</a> defined in the table and procedure above is
expressed in milliseconds, it must be divided by 1,000 to produce a value in
seconds before being assigned to the <code class="idl"><a data-link-type="idl" href="https://drafts.csswg.org/css-animations-1/#dom-animationevent-elapsedtime" id="ref-for-dom-animationevent-elapsedtime①">elapsedTime</a></code> member of
the <code class="idl"><a data-link-type="idl" href="https://drafts.csswg.org/css-animations-1/#animationevent" id="ref-for-animationevent">AnimationEvent</a></code>.</p>
   <h2 class="heading settled" data-level="5" id="interface-dom"><span class="secno">5. </span><span class="content">DOM Interfaces</span><a class="self-link" href="#interface-dom"></a></h2>
   <h3 class="heading settled" data-level="5.1" id="the-CSSAnimation-interface"><span class="secno">5.1. </span><span class="content">The CSSAnimation interface</span><a class="self-link" href="#the-CSSAnimation-interface"></a></h3>
<pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed"><c- g>Exposed</c-></a>=<c- n>Window</c->]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="cssanimation"><code><c- g>CSSAnimation</c-></code></dfn> : <a class="n" data-link-type="idl-name" href="https://w3c.github.io/web-animations/#animation" id="ref-for-animation①"><c- n>Animation</c-></a> {
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring"><c- n>CSSOMString</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="CSSOMString" href="#dom-cssanimation-animationname" id="ref-for-dom-cssanimation-animationname"><c- g>animationName</c-></a>;
};
</pre>
   <dl>
    <dt data-md><dfn class="dfn-paneled idl-code" data-dfn-for="CSSAnimation" data-dfn-type="attribute" data-export id="dom-cssanimation-animationname"><code>animationName</code></dfn>, <span> of type <a data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring①">CSSOMString</a>, readonly</span>
    <dd data-md>
     <p>The key used to find matching keyframes rules that define <a data-link-type="dfn" href="https://w3c.github.io/web-animations/#target-effect" id="ref-for-target-effect⑥">target
effect</a> at the point when the animation was created.
This is the value of the <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-animations-1/#propdef-animation-name" id="ref-for-propdef-animation-name④">animation-name</a> property that caused this
object to be generated or, if this object was generated using the
programming interface, the <code>animationName</code> argument
that was passed to the <code class="idl"><a data-link-type="idl" href="#cssanimation" id="ref-for-cssanimation③">CSSAnimation</a></code> constructor.</p>
   </dl>
   <div class="issue" id="issue-d6d52499">
    <a class="self-link" href="#issue-d6d52499"></a> 
    <p>We need to define a constructor for <code class="idl"><a data-link-type="idl" href="#cssanimation" id="ref-for-cssanimation④">CSSAnimation</a></code>.
Perhaps something like the following:</p>
<pre class="idl highlight def">[<dfn class="idl-code" data-dfn-for="CSSAnimation" data-dfn-type="constructor" data-export data-lt="CSSAnimation(target, animationName, options, defaultEasing)|CSSAnimation(target, animationName, options)|CSSAnimation(target, animationName)" id="dom-cssanimation-cssanimation"><code><c- g>Constructor</c-></code><a class="self-link" href="#dom-cssanimation-cssanimation"></a></dfn> (<a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/web-animations-1/#animatable" id="ref-for-animatable"><c- n>Animatable</c-></a>? <dfn class="idl-code" data-dfn-for="CSSAnimation/CSSAnimation(target, animationName, options, defaultEasing)" data-dfn-type="argument" data-export id="dom-cssanimation-cssanimation-target-animationname-options-defaulteasing-target"><code><c- g>target</c-></code><a class="self-link" href="#dom-cssanimation-cssanimation-target-animationname-options-defaulteasing-target"></a></dfn>,
              <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring②"><c- n>CSSOMString</c-></a> <dfn class="idl-code" data-dfn-for="CSSAnimation/CSSAnimation(target, animationName, options, defaultEasing)" data-dfn-type="argument" data-export id="dom-cssanimation-cssanimation-target-animationname-options-defaulteasing-animationname"><code><c- g>animationName</c-></code><a class="self-link" href="#dom-cssanimation-cssanimation-target-animationname-options-defaulteasing-animationname"></a></dfn>,
              <c- b>optional</c-> (<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unrestricted-double" id="ref-for-idl-unrestricted-double"><c- b>unrestricted</c-> <c- b>double</c-></a> <c- b>or</c-> <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/web-animations-1/#dictdef-keyframeeffectoptions" id="ref-for-dictdef-keyframeeffectoptions"><c- n>KeyframeEffectOptions</c-></a>) <dfn class="idl-code" data-dfn-for="CSSAnimation/CSSAnimation(target, animationName, options, defaultEasing)" data-dfn-type="argument" data-export id="dom-cssanimation-cssanimation-target-animationname-options-defaulteasing-options"><code><c- g>options</c-></code><a class="self-link" href="#dom-cssanimation-cssanimation-target-animationname-options-defaulteasing-options"></a></dfn>,
              <c- b>optional</c-> <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring③"><c- n>CSSOMString</c-></a> <dfn class="idl-code" data-dfn-for="CSSAnimation/CSSAnimation(target, animationName, options, defaultEasing)" data-dfn-type="argument" data-export id="dom-cssanimation-cssanimation-target-animationname-options-defaulteasing-defaulteasing"><code><c- g>defaultEasing</c-></code><a class="self-link" href="#dom-cssanimation-cssanimation-target-animationname-options-defaulteasing-defaulteasing"></a></dfn> = "ease"),
 <dfn class="idl-code" data-dfn-for="CSSAnimation" data-dfn-type="constructor" data-export data-lt="CSSAnimation(target, animationName, options, defaultEasing, timeline)" id="dom-cssanimation-cssanimation-target-animationname-options-defaulteasing-timeline"><code><c- g>Constructor</c-></code><a class="self-link" href="#dom-cssanimation-cssanimation-target-animationname-options-defaulteasing-timeline"></a></dfn> (<a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/web-animations-1/#animatable" id="ref-for-animatable①"><c- n>Animatable</c-></a>? <dfn class="idl-code" data-dfn-for="CSSAnimation/CSSAnimation(target, animationName, options, defaultEasing, timeline)" data-dfn-type="argument" data-export id="dom-cssanimation-cssanimation-target-animationname-options-defaulteasing-timeline-target"><code><c- g>target</c-></code><a class="self-link" href="#dom-cssanimation-cssanimation-target-animationname-options-defaulteasing-timeline-target"></a></dfn>,
              <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring④"><c- n>CSSOMString</c-></a> <dfn class="idl-code" data-dfn-for="CSSAnimation/CSSAnimation(target, animationName, options, defaultEasing, timeline)" data-dfn-type="argument" data-export id="dom-cssanimation-cssanimation-target-animationname-options-defaulteasing-timeline-animationname"><code><c- g>animationName</c-></code><a class="self-link" href="#dom-cssanimation-cssanimation-target-animationname-options-defaulteasing-timeline-animationname"></a></dfn>,
              (<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unrestricted-double" id="ref-for-idl-unrestricted-double①"><c- b>unrestricted</c-> <c- b>double</c-></a> <c- b>or</c-> <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/web-animations-1/#dictdef-keyframeeffectoptions" id="ref-for-dictdef-keyframeeffectoptions①"><c- n>KeyframeEffectOptions</c-></a>) <dfn class="idl-code" data-dfn-for="CSSAnimation/CSSAnimation(target, animationName, options, defaultEasing, timeline)" data-dfn-type="argument" data-export id="dom-cssanimation-cssanimation-target-animationname-options-defaulteasing-timeline-options"><code><c- g>options</c-></code><a class="self-link" href="#dom-cssanimation-cssanimation-target-animationname-options-defaulteasing-timeline-options"></a></dfn>,
              <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring⑤"><c- n>CSSOMString</c-></a> <dfn class="idl-code" data-dfn-for="CSSAnimation/CSSAnimation(target, animationName, options, defaultEasing, timeline)" data-dfn-type="argument" data-export id="dom-cssanimation-cssanimation-target-animationname-options-defaulteasing-timeline-defaulteasing"><code><c- g>defaultEasing</c-></code><a class="self-link" href="#dom-cssanimation-cssanimation-target-animationname-options-defaulteasing-timeline-defaulteasing"></a></dfn>,
              <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/web-animations-1/#animationtimeline" id="ref-for-animationtimeline"><c- n>AnimationTimeline</c-></a>? <dfn class="idl-code" data-dfn-for="CSSAnimation/CSSAnimation(target, animationName, options, defaultEasing, timeline)" data-dfn-type="argument" data-export id="dom-cssanimation-cssanimation-target-animationname-options-defaulteasing-timeline-timeline"><code><c- g>timeline</c-></code><a class="self-link" href="#dom-cssanimation-cssanimation-target-animationname-options-defaulteasing-timeline-timeline"></a></dfn>)]
<c- b>partial</c-> <c- b>interface</c-> <a class="idl-code" data-link-type="interface" href="#cssanimation" id="ref-for-cssanimation⑤"><c- g>CSSAnimation</c-></a> { };
</pre>
    <p>The difficulty is with liveness. The most useful and least magical
(but most complicated) approach is to define a subclass of <code class="idl"><a data-link-type="idl" href="https://w3c.github.io/web-animations/#keyframeeffectreadonly" id="ref-for-keyframeeffectreadonly">KeyframeEffectReadOnly</a></code> that has the special behavior of tracking changes
to all @keyframes rules that match the supplied name and automatically
updating the set of keyframes returned by <code class="idl"><a data-link-type="idl" href="https://w3c.github.io/web-animations/#getframes" id="ref-for-getframes">getFrames()</a></code> after filling-in the default easing.</p>
    <p>Something like,</p>
<pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①"><c- g>Exposed</c-></a>=<c- n>Window</c->,
 <dfn class="idl-code" data-dfn-for="CSSKeyframeEffectReadOnly" data-dfn-type="constructor" data-export data-lt="CSSKeyframeEffectReadOnly(keyframesName, defaultEasing)" id="dom-csskeyframeeffectreadonly-csskeyframeeffectreadonly"><code><c- g>Constructor</c-></code><a class="self-link" href="#dom-csskeyframeeffectreadonly-csskeyframeeffectreadonly"></a></dfn> (<a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring⑥"><c- n>CSSOMString</c-></a> <dfn class="idl-code" data-dfn-for="CSSKeyframeEffectReadOnly/CSSKeyframeEffectReadOnly(keyframesName, defaultEasing)" data-dfn-type="argument" data-export id="dom-csskeyframeeffectreadonly-csskeyframeeffectreadonly-keyframesname-defaulteasing-keyframesname"><code><c- g>keyframesName</c-></code><a class="self-link" href="#dom-csskeyframeeffectreadonly-csskeyframeeffectreadonly-keyframesname-defaulteasing-keyframesname"></a></dfn>, <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring⑦"><c- n>CSSOMString</c-></a> <dfn class="idl-code" data-dfn-for="CSSKeyframeEffectReadOnly/CSSKeyframeEffectReadOnly(keyframesName, defaultEasing)" data-dfn-type="argument" data-export id="dom-csskeyframeeffectreadonly-csskeyframeeffectreadonly-keyframesname-defaulteasing-defaulteasing"><code><c- g>defaultEasing</c-></code><a class="self-link" href="#dom-csskeyframeeffectreadonly-csskeyframeeffectreadonly-keyframesname-defaulteasing-defaulteasing"></a></dfn>)]
<c- b>interface</c-> <dfn class="idl-code" data-dfn-type="interface" data-export id="csskeyframeeffectreadonly"><code><c- g>CSSKeyframeEffectReadOnly</c-></code><a class="self-link" href="#csskeyframeeffectreadonly"></a></dfn> : <a class="n" data-link-type="idl-name" href="https://w3c.github.io/web-animations/#keyframeeffectreadonly" id="ref-for-keyframeeffectreadonly①"><c- n>KeyframeEffectReadOnly</c-></a> {
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring⑧"><c- n>CSSOMString</c-></a> <dfn class="idl-code" data-dfn-for="CSSKeyframeEffectReadOnly" data-dfn-type="attribute" data-export data-readonly data-type="CSSOMString" id="dom-csskeyframeeffectreadonly-keyframesname"><code><c- g>keyframesName</c-></code><a class="self-link" href="#dom-csskeyframeeffectreadonly-keyframesname"></a></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring⑨"><c- n>CSSOMString</c-></a> <dfn class="idl-code" data-dfn-for="CSSKeyframeEffectReadOnly" data-dfn-type="attribute" data-export data-readonly data-type="CSSOMString" id="dom-csskeyframeeffectreadonly-defaulteasing"><code><c- g>defaultEasing</c-></code><a class="self-link" href="#dom-csskeyframeeffectreadonly-defaulteasing"></a></dfn>;
};
</pre>
   </div>
   <h3 class="heading settled" data-level="5.2" id="requirements-on-pending-style-changes"><span class="secno">5.2. </span><span class="content">Requirements on pending style changes</span><a class="self-link" href="#requirements-on-pending-style-changes"></a></h3>
   <p>Various operations may affect the <a data-link-type="dfn" href="https://drafts.csswg.org/css-cascade-4/#computed-value" id="ref-for-computed-value">computed values</a> of
properties on elements. User agents may, as an optimization, defer recomputing
these values until it becomes necessary.
However, all operations included in programming interface defined in this
specification, as well as those operations defined in Web Animations <a data-link-type="biblio" href="#biblio-web-animations">[WEB-ANIMATIONS]</a> that may return objects defined by this specification,
must produce a result consistent with having fully processed any such pending
changes to computed values.</p>
   <div class="note" role="note">
     As an example, in the following code fragment, when the specified style of <code>elem</code> is initially updated, a user agent may defer recalculating
the computed value of the <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-animations-1/#propdef-animation" id="ref-for-propdef-animation">animation</a> property. 
    <p>However, the <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/web-animations-1/#dom-animatable-getanimations" id="ref-for-dom-animatable-getanimations">getAnimations()</a></code> method called on <code>elem</code> is specified by Web Animations and can return <code class="idl"><a data-link-type="idl" href="#cssanimation" id="ref-for-cssanimation⑥">CSSAnimation</a></code> objects as
defined in this specification.
Hence, as result of the requirements in this section, the user agent must
calculate the updated value of <code>elem</code>’s <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-animations-1/#propdef-animation" id="ref-for-propdef-animation①">animation</a> property and
create the requested <code class="idl"><a data-link-type="idl" href="#cssanimation" id="ref-for-cssanimation⑦">CSSAnimation</a></code> object before returning its result.</p>
    <div>
<pre class="example lang-javascript highlight" id="example-7f1c6b4e"><a class="self-link" href="#example-7f1c6b4e"></a>elem<c- p>.</c->style<c- p>.</c->animation <c- o>=</c-> <c- t>'fadeOut 1s'</c-><c- p>;</c->
elem<c- p>.</c->getAnimations<c- p>()[</c-><c- mi>0</c-><c- p>].</c->pause<c- p>();</c->
</pre>
    </div>
   </div>
   <h2 class="heading settled" data-level="6" id="priv-sec"><span class="secno">6. </span><span class="content"> Privacy and Security Considerations</span><a class="self-link" href="#priv-sec"></a></h2>
   <p>This specification introduces no new privacy or security considerations.</p>
  </main>
  <h2 class="no-ref no-num heading settled" id="conformance"><span class="content"> Conformance</span><a class="self-link" href="#conformance"></a></h2>
  <h3 class="heading settled" id="document-conventions"><span class="content"> Document conventions</span><a class="self-link" href="#document-conventions"></a></h3>
  <p>Conformance requirements are expressed with a combination of
	descriptive assertions and RFC 2119 terminology. The key words “MUST”,
	“MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”,
	“RECOMMENDED”, “MAY”, and “OPTIONAL” in the normative parts of this
	document are to be interpreted as described in RFC 2119.
	However, for readability, these words do not appear in all uppercase
	letters in this specification. </p>
  <p>All of the text of this specification is normative except sections
	explicitly marked as non-normative, examples, and notes. <a data-link-type="biblio" href="#biblio-rfc2119">[RFC2119]</a> </p>
  <p>Examples in this specification are introduced with the words “for example”
	or are set apart from the normative text with <code>class="example"</code>,
	like this: </p>
  <div class="example" id="example-ae2b6bc0">
   <a class="self-link" href="#example-ae2b6bc0"></a> 
   <p>This is an example of an informative example. </p>
  </div>
  <p>Informative notes begin with the word “Note” and are set apart from the
	normative text with <code>class="note"</code>, like this: </p>
  <p class="note" role="note">Note, this is an informative note. </p>
  <p>Advisements are normative sections styled to evoke special attention and are
	set apart from other normative text with <code>&lt;strong class="advisement"></code>, like
	this: <strong class="advisement"> UAs MUST provide an accessible alternative. </strong> </p>
  <h3 class="heading settled" id="conform-classes"><span class="content"> Conformance classes</span><a class="self-link" href="#conform-classes"></a></h3>
  <p>Conformance to this specification
	is defined for three conformance classes: </p>
  <dl>
   <dt>style sheet 
   <dd>A <a href="http://www.w3.org/TR/CSS2/conform.html#style-sheet">CSS
			style sheet</a>. 
   <dt>renderer 
   <dd>A <a href="http://www.w3.org/TR/CSS2/conform.html#user-agent">UA</a> that interprets the semantics of a style sheet and renders
			documents that use them. 
   <dt>authoring tool 
   <dd>A <a href="http://www.w3.org/TR/CSS2/conform.html#user-agent">UA</a> that writes a style sheet. 
  </dl>
  <p>A style sheet is conformant to this specification
	if all of its statements that use syntax defined in this module are valid
	according to the generic CSS grammar and the individual grammars of each
	feature defined in this module. </p>
  <p>A renderer is conformant to this specification
	if, in addition to interpreting the style sheet as defined by the
	appropriate specifications, it supports all the features defined
	by this specification by parsing them correctly
	and rendering the document accordingly. However, the inability of a
	UA to correctly render a document due to limitations of the device
	does not make the UA non-conformant. (For example, a UA is not
	required to render color on a monochrome monitor.) </p>
  <p>An authoring tool is conformant to this specification
	if it writes style sheets that are syntactically correct according to the
	generic CSS grammar and the individual grammars of each feature in
	this module, and meet all other conformance requirements of style sheets
	as described in this module. </p>
  <h3 class="heading settled" id="conform-responsible"><span class="content"> Requirements for Responsible Implementation of CSS</span><a class="self-link" href="#conform-responsible"></a></h3>
  <p>The following sections define several conformance requirements
		for implementing CSS responsibly,
		in a way that promotes interoperability in the present and future. </p>
  <h4 class="heading settled" id="conform-partial"><span class="content"> Partial Implementations</span><a class="self-link" href="#conform-partial"></a></h4>
  <p>So that authors can exploit the forward-compatible parsing rules to assign fallback values, <strong>CSS renderers <em>must</em> treat as invalid
		(and <a href="http://www.w3.org/TR/CSS2/conform.html#ignore">ignore as appropriate</a>)
		any at-rules, properties, property values, keywords, and other syntactic constructs
		for which they have no usable level of support</strong>.
		In particular, user agents <em>must not</em> selectively ignore
		unsupported property values and honor supported values in a single multi-value property declaration:
		if any value is considered invalid (as unsupported values must be),
		CSS requires that the entire declaration be ignored. </p>
  <h4 class="heading settled" id="conform-future-proofing"><span class="content"> Implementations of Unstable and Proprietary Features</span><a class="self-link" href="#conform-future-proofing"></a></h4>
  <p>To avoid clashes with future stable CSS features,
		the CSSWG recommends <a href="http://www.w3.org/TR/CSS/#future-proofing">following best practices</a> for the implementation of <a href="http://www.w3.org/TR/CSS/#unstable">unstable</a> features and <a href="http://www.w3.org/TR/CSS/#proprietary-extension">proprietary extensions</a> to CSS. </p>
  <h4 class="heading settled" id="conform-testing"><span class="content"> Implementations of CR-level Features</span><a class="self-link" href="#conform-testing"></a></h4>
  <p>Once a specification reaches the Candidate Recommendation stage,
		implementers should release an <a data-link-type="dfn" href="http://www.w3.org/TR/CSS/#vendor-prefix">unprefixed</a> implementation
		of any CR-level feature they can demonstrate
		to be correctly implemented according to spec,
		and should avoid exposing a prefixed variant of that feature. </p>
  <p>To establish and maintain the interoperability of CSS across
		implementations, the CSS Working Group requests that non-experimental
		CSS renderers submit an implementation report (and, if necessary, the
		testcases used for that implementation report) to the W3C before
		releasing an unprefixed implementation of any CSS features. Testcases
		submitted to W3C are subject to review and correction by the CSS
		Working Group. </p>
  <p>
   Further information on submitting testcases and implementation reports
		can be found from on the CSS Working Group’s website at <a href="http://www.w3.org/Style/CSS/Test/">http://www.w3.org/Style/CSS/Test/</a>.
		Questions should be directed to the <a href="http://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a> mailing list. 
<script src="https://www.w3.org/scripts/TR/2016/fixup.js"></script>
  </p>
  <h2 class="no-num no-ref heading settled" id="index"><span class="content">Index</span><a class="self-link" href="#index"></a></h2>
  <h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="content">Terms defined by this specification</span><a class="self-link" href="#index-defined-here"></a></h3>
  <ul class="index">
   <li><a href="#propdef-animation-composition">animation-composition</a><span>, in §3.2</span>
   <li><a href="#dom-cssanimation-animationname">animationName</a><span>, in §5.1</span>
   <li><a href="#cssanimation">CSSAnimation</a><span>, in §5.1</span>
   <li><a href="#dom-cssanimation-cssanimation">CSSAnimation(target, animationName)</a><span>, in §5.1</span>
   <li><a href="#dom-cssanimation-cssanimation">CSSAnimation(target, animationName, options)</a><span>, in §5.1</span>
   <li><a href="#dom-cssanimation-cssanimation">CSSAnimation(target, animationName, options, defaultEasing)</a><span>, in §5.1</span>
   <li><a href="#dom-cssanimation-cssanimation-target-animationname-options-defaulteasing-timeline">CSSAnimation(target, animationName, options, defaultEasing, timeline)</a><span>, in §5.1</span>
   <li><a href="#csskeyframeeffectreadonly">CSSKeyframeEffectReadOnly</a><span>, in §5.1</span>
   <li><a href="#dom-csskeyframeeffectreadonly-csskeyframeeffectreadonly">CSSKeyframeEffectReadOnly(keyframesName, defaultEasing)</a><span>, in §5.1</span>
   <li><a href="#dom-csskeyframeeffectreadonly-defaulteasing">defaultEasing</a><span>, in §5.1</span>
   <li><a href="#elapsed-time">Elapsed time</a><span>, in §4.1</span>
   <li><a href="#interval-end">interval end</a><span>, in §4.1</span>
   <li><a href="#interval-start">interval start</a><span>, in §4.1</span>
   <li><a href="#dom-csskeyframeeffectreadonly-keyframesname">keyframesName</a><span>, in §5.1</span>
   <li><a href="#owning-element">owning element</a><span>, in §2.1</span>
   <li><a href="#typedef-single-animation-composition">&lt;single-animation-composition></a><span>, in §3.2</span>
  </ul>
  <aside class="dfn-panel" data-for="term-for-computed-value">
   <a href="https://drafts.csswg.org/css-cascade-4/#computed-value">https://drafts.csswg.org/css-cascade-4/#computed-value</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-computed-value">5.2. Requirements on pending style changes</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-valdef-mask-composite-add">
   <a href="https://drafts.fxtf.org/css-masking-1/#valdef-mask-composite-add">https://drafts.fxtf.org/css-masking-1/#valdef-mask-composite-add</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-mask-composite-add">3.2. The animation-composition property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-propdef-scale">
   <a href="https://drafts.csswg.org/css-transforms-2/#propdef-scale">https://drafts.csswg.org/css-transforms-2/#propdef-scale</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-scale">3.2. The animation-composition property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-mult-comma">
   <a href="https://drafts.csswg.org/css-values-4/#mult-comma">https://drafts.csswg.org/css-values-4/#mult-comma</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-mult-comma">3.2. The animation-composition property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-animationevent">
   <a href="https://drafts.csswg.org/css-animations-1/#animationevent">https://drafts.csswg.org/css-animations-1/#animationevent</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-animationevent">4.1. Event dispatch</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-propdef-animation">
   <a href="https://drafts.csswg.org/css-animations-1/#propdef-animation">https://drafts.csswg.org/css-animations-1/#propdef-animation</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-animation">5.2. Requirements on pending style changes</a> <a href="#ref-for-propdef-animation①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-propdef-animation-name">
   <a href="https://drafts.csswg.org/css-animations-1/#propdef-animation-name">https://drafts.csswg.org/css-animations-1/#propdef-animation-name</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-animation-name">2.1. Owning element</a> <a href="#ref-for-propdef-animation-name①">(2)</a> <a href="#ref-for-propdef-animation-name②">(3)</a>
    <li><a href="#ref-for-propdef-animation-name③">2.2. Animation composite order</a>
    <li><a href="#ref-for-propdef-animation-name④">5.1. The CSSAnimation interface</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-propdef-animation-play-state">
   <a href="https://drafts.csswg.org/css-animations-1/#propdef-animation-play-state">https://drafts.csswg.org/css-animations-1/#propdef-animation-play-state</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-animation-play-state">3.1. The animation-play-state property</a>
    <li><a href="#ref-for-propdef-animation-play-state①">3.1.1. Interaction between animation-play-state and the Web Animations API</a> <a href="#ref-for-propdef-animation-play-state②">(2)</a> <a href="#ref-for-propdef-animation-play-state③">(3)</a> <a href="#ref-for-propdef-animation-play-state④">(4)</a> <a href="#ref-for-propdef-animation-play-state⑤">(5)</a> <a href="#ref-for-propdef-animation-play-state⑥">(6)</a> <a href="#ref-for-propdef-animation-play-state⑦">(7)</a> <a href="#ref-for-propdef-animation-play-state⑧">(8)</a> <a href="#ref-for-propdef-animation-play-state⑨">(9)</a> <a href="#ref-for-propdef-animation-play-state①⓪">(10)</a> <a href="#ref-for-propdef-animation-play-state①①">(11)</a> <a href="#ref-for-propdef-animation-play-state①②">(12)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-eventdef-animationevent-animationcancel">
   <a href="https://drafts.csswg.org/css-animations-1/#eventdef-animationevent-animationcancel">https://drafts.csswg.org/css-animations-1/#eventdef-animationevent-animationcancel</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-eventdef-animationevent-animationcancel">4.1. Event dispatch</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-eventdef-animationevent-animationend">
   <a href="https://drafts.csswg.org/css-animations-1/#eventdef-animationevent-animationend">https://drafts.csswg.org/css-animations-1/#eventdef-animationevent-animationend</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-eventdef-animationevent-animationend">4.1. Event dispatch</a> <a href="#ref-for-eventdef-animationevent-animationend①">(2)</a> <a href="#ref-for-eventdef-animationevent-animationend②">(3)</a> <a href="#ref-for-eventdef-animationevent-animationend③">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-eventdef-animationevent-animationiteration">
   <a href="https://drafts.csswg.org/css-animations-1/#eventdef-animationevent-animationiteration">https://drafts.csswg.org/css-animations-1/#eventdef-animationevent-animationiteration</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-eventdef-animationevent-animationiteration">4.1. Event dispatch</a> <a href="#ref-for-eventdef-animationevent-animationiteration①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-eventdef-animationevent-animationstart">
   <a href="https://drafts.csswg.org/css-animations-1/#eventdef-animationevent-animationstart">https://drafts.csswg.org/css-animations-1/#eventdef-animationevent-animationstart</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-eventdef-animationevent-animationstart">4.1. Event dispatch</a> <a href="#ref-for-eventdef-animationevent-animationstart①">(2)</a> <a href="#ref-for-eventdef-animationevent-animationstart②">(3)</a> <a href="#ref-for-eventdef-animationevent-animationstart③">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-dom-animationevent-elapsedtime">
   <a href="https://drafts.csswg.org/css-animations-1/#dom-animationevent-elapsedtime">https://drafts.csswg.org/css-animations-1/#dom-animationevent-elapsedtime</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-animationevent-elapsedtime">4.1. Event dispatch</a> <a href="#ref-for-dom-animationevent-elapsedtime①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-valdef-animation-play-state-paused">
   <a href="https://drafts.csswg.org/css-animations-1/#valdef-animation-play-state-paused">https://drafts.csswg.org/css-animations-1/#valdef-animation-play-state-paused</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-animation-play-state-paused">3.1.1. Interaction between animation-play-state and the Web Animations API</a> <a href="#ref-for-valdef-animation-play-state-paused①">(2)</a> <a href="#ref-for-valdef-animation-play-state-paused②">(3)</a> <a href="#ref-for-valdef-animation-play-state-paused③">(4)</a> <a href="#ref-for-valdef-animation-play-state-paused④">(5)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-valdef-animation-play-state-running">
   <a href="https://drafts.csswg.org/css-animations-1/#valdef-animation-play-state-running">https://drafts.csswg.org/css-animations-1/#valdef-animation-play-state-running</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-animation-play-state-running">3.1.1. Interaction between animation-play-state and the Web Animations API</a> <a href="#ref-for-valdef-animation-play-state-running①">(2)</a> <a href="#ref-for-valdef-animation-play-state-running②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-cssomstring">
   <a href="https://drafts.csswg.org/cssom-1/#cssomstring">https://drafts.csswg.org/cssom-1/#cssomstring</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-cssomstring">5.1. The CSSAnimation interface</a> <a href="#ref-for-cssomstring①">(2)</a> <a href="#ref-for-cssomstring②">(3)</a> <a href="#ref-for-cssomstring③">(4)</a> <a href="#ref-for-cssomstring④">(5)</a> <a href="#ref-for-cssomstring⑤">(6)</a> <a href="#ref-for-cssomstring⑥">(7)</a> <a href="#ref-for-cssomstring⑦">(8)</a> <a href="#ref-for-cssomstring⑧">(9)</a> <a href="#ref-for-cssomstring⑨">(10)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-concept-tree-order">
   <a href="https://dom.spec.whatwg.org/#concept-tree-order">https://dom.spec.whatwg.org/#concept-tree-order</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-concept-tree-order">2.2. Animation composite order</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-animatable">
   <a href="https://drafts.csswg.org/web-animations-1/#animatable">https://drafts.csswg.org/web-animations-1/#animatable</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-animatable">5.1. The CSSAnimation interface</a> <a href="#ref-for-animatable①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-animation">
   <a href="https://w3c.github.io/web-animations/#animation">https://w3c.github.io/web-animations/#animation</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-animation">2.2. Animation composite order</a>
    <li><a href="#ref-for-animation①">5.1. The CSSAnimation interface</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-animationtimeline">
   <a href="https://drafts.csswg.org/web-animations-1/#animationtimeline">https://drafts.csswg.org/web-animations-1/#animationtimeline</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-animationtimeline">5.1. The CSSAnimation interface</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-dictdef-keyframeeffectoptions">
   <a href="https://drafts.csswg.org/web-animations-1/#dictdef-keyframeeffectoptions">https://drafts.csswg.org/web-animations-1/#dictdef-keyframeeffectoptions</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dictdef-keyframeeffectoptions">5.1. The CSSAnimation interface</a> <a href="#ref-for-dictdef-keyframeeffectoptions①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-keyframeeffectreadonly">
   <a href="https://w3c.github.io/web-animations/#keyframeeffectreadonly">https://w3c.github.io/web-animations/#keyframeeffectreadonly</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-keyframeeffectreadonly">5.1. The CSSAnimation interface</a> <a href="#ref-for-keyframeeffectreadonly①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-active-duration">
   <a href="https://w3c.github.io/web-animations/#active-duration">https://w3c.github.io/web-animations/#active-duration</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-active-duration">4.1. Event dispatch</a> <a href="#ref-for-active-duration①">(2)</a> <a href="#ref-for-active-duration②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-active-phase">
   <a href="https://w3c.github.io/web-animations/#active-phase">https://w3c.github.io/web-animations/#active-phase</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-active-phase">4.1. Event dispatch</a> <a href="#ref-for-active-phase①">(2)</a> <a href="#ref-for-active-phase②">(3)</a> <a href="#ref-for-active-phase③">(4)</a> <a href="#ref-for-active-phase④">(5)</a> <a href="#ref-for-active-phase⑤">(6)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-active-time">
   <a href="https://w3c.github.io/web-animations/#active-time">https://w3c.github.io/web-animations/#active-time</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-active-time">4.1. Event dispatch</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-after-phase">
   <a href="https://w3c.github.io/web-animations/#after-phase">https://w3c.github.io/web-animations/#after-phase</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-after-phase">4.1. Event dispatch</a> <a href="#ref-for-after-phase①">(2)</a> <a href="#ref-for-after-phase②">(3)</a> <a href="#ref-for-after-phase③">(4)</a> <a href="#ref-for-after-phase④">(5)</a> <a href="#ref-for-after-phase⑤">(6)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-animation">
   <a href="https://w3c.github.io/web-animations/#animation">https://w3c.github.io/web-animations/#animation</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-animation">2.2. Animation composite order</a>
    <li><a href="#ref-for-animation①">5.1. The CSSAnimation interface</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-animation-class">
   <a href="https://w3c.github.io/web-animations/#animation-class">https://w3c.github.io/web-animations/#animation-class</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-animation-class">2.2. Animation composite order</a> <a href="#ref-for-animation-class①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-animation-effect">
   <a href="https://w3c.github.io/web-animations/#animation-effect">https://w3c.github.io/web-animations/#animation-effect</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-animation-effect">4.1. Event dispatch</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-before-phase">
   <a href="https://w3c.github.io/web-animations/#before-phase">https://w3c.github.io/web-animations/#before-phase</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-before-phase">4.1. Event dispatch</a> <a href="#ref-for-before-phase①">(2)</a> <a href="#ref-for-before-phase②">(3)</a> <a href="#ref-for-before-phase③">(4)</a> <a href="#ref-for-before-phase④">(5)</a> <a href="#ref-for-before-phase⑤">(6)</a> <a href="#ref-for-before-phase⑥">(7)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-composite-operation">
   <a href="https://w3c.github.io/web-animations/#composite-operation">https://w3c.github.io/web-animations/#composite-operation</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-composite-operation">3.2. The animation-composition property</a> <a href="#ref-for-composite-operation①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-current-iteration">
   <a href="https://w3c.github.io/web-animations/#current-iteration">https://w3c.github.io/web-animations/#current-iteration</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-current-iteration">4.1. Event dispatch</a> <a href="#ref-for-current-iteration①">(2)</a> <a href="#ref-for-current-iteration②">(3)</a> <a href="#ref-for-current-iteration③">(4)</a> <a href="#ref-for-current-iteration④">(5)</a> <a href="#ref-for-current-iteration⑤">(6)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-current-time">
   <a href="https://w3c.github.io/web-animations/#current-time">https://w3c.github.io/web-animations/#current-time</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-current-time">4.1. Event dispatch</a> <a href="#ref-for-current-time①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-fill-mode">
   <a href="https://w3c.github.io/web-animations/#fill-mode">https://w3c.github.io/web-animations/#fill-mode</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-fill-mode">4.1. Event dispatch</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-dom-animatable-getanimations">
   <a href="https://www.w3.org/TR/web-animations-1/#dom-animatable-getanimations">https://www.w3.org/TR/web-animations-1/#dom-animatable-getanimations</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-animatable-getanimations">5.2. Requirements on pending style changes</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-getframes">
   <a href="https://w3c.github.io/web-animations/#getframes">https://w3c.github.io/web-animations/#getframes</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-getframes">5.1. The CSSAnimation interface</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-global-animation-list">
   <a href="https://w3c.github.io/web-animations/#global-animation-list">https://w3c.github.io/web-animations/#global-animation-list</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-global-animation-list">2.2. Animation composite order</a> <a href="#ref-for-global-animation-list①">(2)</a> <a href="#ref-for-global-animation-list②">(3)</a> <a href="#ref-for-global-animation-list③">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-idle-phase">
   <a href="https://w3c.github.io/web-animations/#idle-phase">https://w3c.github.io/web-animations/#idle-phase</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-idle-phase">4.1. Event dispatch</a> <a href="#ref-for-idle-phase①">(2)</a> <a href="#ref-for-idle-phase②">(3)</a> <a href="#ref-for-idle-phase③">(4)</a> <a href="#ref-for-idle-phase④">(5)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-idle-play-state">
   <a href="https://w3c.github.io/web-animations/#idle-play-state">https://w3c.github.io/web-animations/#idle-play-state</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-idle-play-state">2.2. Animation composite order</a> <a href="#ref-for-idle-play-state①">(2)</a> <a href="#ref-for-idle-play-state②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-iteration-duration">
   <a href="https://w3c.github.io/web-animations/#iteration-duration">https://w3c.github.io/web-animations/#iteration-duration</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-iteration-duration">4.1. Event dispatch</a> <a href="#ref-for-iteration-duration①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-iteration-start">
   <a href="https://w3c.github.io/web-animations/#iteration-start">https://w3c.github.io/web-animations/#iteration-start</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-iteration-start">4.1. Event dispatch</a> <a href="#ref-for-iteration-start①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-pause-an-animation">
   <a href="https://w3c.github.io/web-animations/#pause-an-animation">https://w3c.github.io/web-animations/#pause-an-animation</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-pause-an-animation">3.1.1. Interaction between animation-play-state and the Web Animations API</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-pause">
   <a href="https://w3c.github.io/web-animations/#pause">https://w3c.github.io/web-animations/#pause</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-pause">3.1.1. Interaction between animation-play-state and the Web Animations API</a> <a href="#ref-for-pause①">(2)</a> <a href="#ref-for-pause②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-pending-play-state">
   <a href="https://w3c.github.io/web-animations/#pending-play-state">https://w3c.github.io/web-animations/#pending-play-state</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-pending-play-state">4.1. Event dispatch</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-play-an-animation">
   <a href="https://w3c.github.io/web-animations/#play-an-animation">https://w3c.github.io/web-animations/#play-an-animation</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-play-an-animation">3.1.1. Interaction between animation-play-state and the Web Animations API</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-play">
   <a href="https://w3c.github.io/web-animations/#play">https://w3c.github.io/web-animations/#play</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-play">3.1.1. Interaction between animation-play-state and the Web Animations API</a> <a href="#ref-for-play①">(2)</a> <a href="#ref-for-play②">(3)</a> <a href="#ref-for-play③">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-sampling">
   <a href="https://w3c.github.io/web-animations/#sampling">https://w3c.github.io/web-animations/#sampling</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-sampling">4.1. Event dispatch</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-start-delay">
   <a href="https://w3c.github.io/web-animations/#start-delay">https://w3c.github.io/web-animations/#start-delay</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-start-delay">4.1. Event dispatch</a> <a href="#ref-for-start-delay①">(2)</a> <a href="#ref-for-start-delay②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-target-effect">
   <a href="https://w3c.github.io/web-animations/#target-effect">https://w3c.github.io/web-animations/#target-effect</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-target-effect">2.1. Owning element</a>
    <li><a href="#ref-for-target-effect①">4.1. Event dispatch</a> <a href="#ref-for-target-effect②">(2)</a> <a href="#ref-for-target-effect③">(3)</a> <a href="#ref-for-target-effect④">(4)</a> <a href="#ref-for-target-effect⑤">(5)</a>
    <li><a href="#ref-for-target-effect⑥">5.1. The CSSAnimation interface</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-target-effect-end">
   <a href="https://w3c.github.io/web-animations/#target-effect-end">https://w3c.github.io/web-animations/#target-effect-end</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-target-effect-end">4.1. Event dispatch</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-target-element">
   <a href="https://w3c.github.io/web-animations/#target-element">https://w3c.github.io/web-animations/#target-element</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-target-element">2.1. Owning element</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-unresolved">
   <a href="https://w3c.github.io/web-animations/#unresolved">https://w3c.github.io/web-animations/#unresolved</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-unresolved">4.1. Event dispatch</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-Exposed">
   <a href="https://heycam.github.io/webidl/#Exposed">https://heycam.github.io/webidl/#Exposed</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-Exposed">5.1. The CSSAnimation interface</a> <a href="#ref-for-Exposed①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-idl-unrestricted-double">
   <a href="https://heycam.github.io/webidl/#idl-unrestricted-double">https://heycam.github.io/webidl/#idl-unrestricted-double</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-idl-unrestricted-double">5.1. The CSSAnimation interface</a> <a href="#ref-for-idl-unrestricted-double①">(2)</a>
   </ul>
  </aside>
  <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span class="content">Terms defined by reference</span><a class="self-link" href="#index-defined-elsewhere"></a></h3>
  <ul class="index">
   <li>
    <a data-link-type="biblio">[css-cascade-4]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-computed-value" style="color:initial">computed value</span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-masking-1]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-valdef-mask-composite-add" style="color:initial">add</span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-transforms-2]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-propdef-scale" style="color:initial">scale</span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-values-4]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-mult-comma" style="color:initial">#</span>
    </ul>
   <li>
    <a data-link-type="biblio">[CSS3-ANIMATIONS]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-animationevent" style="color:initial">AnimationEvent</span>
     <li><span class="dfn-paneled" id="term-for-propdef-animation" style="color:initial">animation</span>
     <li><span class="dfn-paneled" id="term-for-propdef-animation-name" style="color:initial">animation-name</span>
     <li><span class="dfn-paneled" id="term-for-propdef-animation-play-state" style="color:initial">animation-play-state</span>
     <li><span class="dfn-paneled" id="term-for-eventdef-animationevent-animationcancel" style="color:initial">animationcancel</span>
     <li><span class="dfn-paneled" id="term-for-eventdef-animationevent-animationend" style="color:initial">animationend</span>
     <li><span class="dfn-paneled" id="term-for-eventdef-animationevent-animationiteration" style="color:initial">animationiteration</span>
     <li><span class="dfn-paneled" id="term-for-eventdef-animationevent-animationstart" style="color:initial">animationstart</span>
     <li><span class="dfn-paneled" id="term-for-dom-animationevent-elapsedtime" style="color:initial">elapsedTime</span>
     <li><span class="dfn-paneled" id="term-for-valdef-animation-play-state-paused" style="color:initial">paused</span>
     <li><span class="dfn-paneled" id="term-for-valdef-animation-play-state-running" style="color:initial">running</span>
    </ul>
   <li>
    <a data-link-type="biblio">[cssom-1]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-cssomstring" style="color:initial">CSSOMString</span>
    </ul>
   <li>
    <a data-link-type="biblio">[DOM]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-concept-tree-order" style="color:initial">tree order</span>
    </ul>
   <li>
    <a data-link-type="biblio">[WEB-ANIMATIONS]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-animatable" style="color:initial">Animatable</span>
     <li><span class="dfn-paneled" id="term-for-animation" style="color:initial">Animation</span>
     <li><span class="dfn-paneled" id="term-for-animationtimeline" style="color:initial">AnimationTimeline</span>
     <li><span class="dfn-paneled" id="term-for-dictdef-keyframeeffectoptions" style="color:initial">KeyframeEffectOptions</span>
     <li><span class="dfn-paneled" id="term-for-keyframeeffectreadonly" style="color:initial">KeyframeEffectReadOnly</span>
     <li><span class="dfn-paneled" id="term-for-active-duration" style="color:initial">active duration</span>
     <li><span class="dfn-paneled" id="term-for-active-phase" style="color:initial">active phase</span>
     <li><span class="dfn-paneled" id="term-for-active-time" style="color:initial">active time</span>
     <li><span class="dfn-paneled" id="term-for-after-phase" style="color:initial">after phase</span>
     <li><span class="dfn-paneled" id="term-for-animation①" style="color:initial">animation</span>
     <li><span class="dfn-paneled" id="term-for-animation-class" style="color:initial">animation class</span>
     <li><span class="dfn-paneled" id="term-for-animation-effect" style="color:initial">animation effect</span>
     <li><span class="dfn-paneled" id="term-for-before-phase" style="color:initial">before phase</span>
     <li><span class="dfn-paneled" id="term-for-composite-operation" style="color:initial">composite operation</span>
     <li><span class="dfn-paneled" id="term-for-current-iteration" style="color:initial">current iteration</span>
     <li><span class="dfn-paneled" id="term-for-current-time" style="color:initial">current time</span>
     <li><span class="dfn-paneled" id="term-for-fill-mode" style="color:initial">fill mode</span>
     <li><span class="dfn-paneled" id="term-for-dom-animatable-getanimations" style="color:initial">getAnimations()</span>
     <li><span class="dfn-paneled" id="term-for-getframes" style="color:initial">getFrames()</span>
     <li><span class="dfn-paneled" id="term-for-global-animation-list" style="color:initial">global animation list</span>
     <li><span class="dfn-paneled" id="term-for-idle-phase" style="color:initial">idle phase</span>
     <li><span class="dfn-paneled" id="term-for-idle-play-state" style="color:initial">idle play state</span>
     <li><span class="dfn-paneled" id="term-for-iteration-duration" style="color:initial">iteration duration</span>
     <li><span class="dfn-paneled" id="term-for-iteration-start" style="color:initial">iteration start</span>
     <li><span class="dfn-paneled" id="term-for-pause-an-animation" style="color:initial">pause an animation</span>
     <li><span class="dfn-paneled" id="term-for-pause" style="color:initial">pause()</span>
     <li><span class="dfn-paneled" id="term-for-pending-play-state" style="color:initial">pending play state</span>
     <li><span class="dfn-paneled" id="term-for-play-an-animation" style="color:initial">play an animation</span>
     <li><span class="dfn-paneled" id="term-for-play" style="color:initial">play()</span>
     <li><span class="dfn-paneled" id="term-for-sampling" style="color:initial">sampling</span>
     <li><span class="dfn-paneled" id="term-for-start-delay" style="color:initial">start delay</span>
     <li><span class="dfn-paneled" id="term-for-target-effect" style="color:initial">target effect</span>
     <li><span class="dfn-paneled" id="term-for-target-effect-end" style="color:initial">target effect end</span>
     <li><span class="dfn-paneled" id="term-for-target-element" style="color:initial">target element</span>
     <li><span class="dfn-paneled" id="term-for-unresolved" style="color:initial">unresolved</span>
    </ul>
   <li>
    <a data-link-type="biblio">[WebIDL]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-Exposed" style="color:initial">Exposed</span>
     <li><span class="dfn-paneled" id="term-for-idl-unrestricted-double" style="color:initial">unrestricted double</span>
    </ul>
  </ul>
  <h2 class="no-num no-ref heading settled" id="references"><span class="content">References</span><a class="self-link" href="#references"></a></h2>
  <h3 class="no-num no-ref heading settled" id="normative"><span class="content">Normative References</span><a class="self-link" href="#normative"></a></h3>
  <dl>
   <dt id="biblio-css-cascade-4">[CSS-CASCADE-4]
   <dd>Elika Etemad; Tab Atkins Jr.. <a href="https://www.w3.org/TR/css-cascade-4/">CSS Cascading and Inheritance Level 4</a>. 28 August 2018. CR. URL: <a href="https://www.w3.org/TR/css-cascade-4/">https://www.w3.org/TR/css-cascade-4/</a>
   <dt id="biblio-css-values-4">[CSS-VALUES-4]
   <dd>Tab Atkins Jr.; Elika Etemad. <a href="https://www.w3.org/TR/css-values-4/">CSS Values and Units Module Level 4</a>. 31 January 2019. WD. URL: <a href="https://www.w3.org/TR/css-values-4/">https://www.w3.org/TR/css-values-4/</a>
   <dt id="biblio-css3-animations">[CSS3-ANIMATIONS]
   <dd>Dean Jackson; et al. <a href="https://www.w3.org/TR/css-animations-1/">CSS Animations Level 1</a>. 11 October 2018. WD. URL: <a href="https://www.w3.org/TR/css-animations-1/">https://www.w3.org/TR/css-animations-1/</a>
   <dt id="biblio-cssom-1">[CSSOM-1]
   <dd>Simon Pieters; Glenn Adams. <a href="https://www.w3.org/TR/cssom-1/">CSS Object Model (CSSOM)</a>. 17 March 2016. WD. URL: <a href="https://www.w3.org/TR/cssom-1/">https://www.w3.org/TR/cssom-1/</a>
   <dt id="biblio-dom">[DOM]
   <dd>Anne van Kesteren. <a href="https://dom.spec.whatwg.org/">DOM Standard</a>. Living Standard. URL: <a href="https://dom.spec.whatwg.org/">https://dom.spec.whatwg.org/</a>
   <dt id="biblio-rfc2119">[RFC2119]
   <dd>S. Bradner. <a href="https://tools.ietf.org/html/rfc2119">Key words for use in RFCs to Indicate Requirement Levels</a>. March 1997. Best Current Practice. URL: <a href="https://tools.ietf.org/html/rfc2119">https://tools.ietf.org/html/rfc2119</a>
   <dt id="biblio-web-animations">[WEB-ANIMATIONS]
   <dd>Brian Birtles; et al. <a href="https://www.w3.org/TR/web-animations-1/">Web Animations</a>. 11 October 2018. WD. URL: <a href="https://www.w3.org/TR/web-animations-1/">https://www.w3.org/TR/web-animations-1/</a>
   <dt id="biblio-webidl">[WebIDL]
   <dd>Boris Zbarsky. <a href="https://heycam.github.io/webidl/">Web IDL</a>. 15 December 2016. ED. URL: <a href="https://heycam.github.io/webidl/">https://heycam.github.io/webidl/</a>
  </dl>
  <h3 class="no-num no-ref heading settled" id="informative"><span class="content">Informative References</span><a class="self-link" href="#informative"></a></h3>
  <dl>
   <dt id="biblio-css-masking-1">[CSS-MASKING-1]
   <dd>Dirk Schulze; Brian Birtles; Tab Atkins Jr.. <a href="https://www.w3.org/TR/css-masking-1/">CSS Masking Module Level 1</a>. 26 August 2014. CR. URL: <a href="https://www.w3.org/TR/css-masking-1/">https://www.w3.org/TR/css-masking-1/</a>
   <dt id="biblio-css-transforms-2">[CSS-TRANSFORMS-2]
   <dd>CSS Transforms Module Level 2 URL: <a href="https://drafts.csswg.org/css-transforms-2/">https://drafts.csswg.org/css-transforms-2/</a>
   <dt id="biblio-css3-transitions">[CSS3-TRANSITIONS]
   <dd>David Baron; et al. <a href="https://www.w3.org/TR/css-transitions-1/">CSS Transitions</a>. 11 October 2018. WD. URL: <a href="https://www.w3.org/TR/css-transitions-1/">https://www.w3.org/TR/css-transitions-1/</a>
  </dl>
  <h2 class="no-num no-ref heading settled" id="property-index"><span class="content">Property Index</span><a class="self-link" href="#property-index"></a></h2>
  <div class="big-element-wrapper">
   <table class="index">
    <thead>
     <tr>
      <th scope="col">Name
      <th scope="col">Value
      <th scope="col">Initial
      <th scope="col">Applies to
      <th scope="col">Inh.
      <th scope="col">%ages
      <th scope="col">Anim­ation type
      <th scope="col">Canonical order
      <th scope="col">Com­puted value
    <tbody>
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-animation-composition" id="ref-for-propdef-animation-composition⑥">animation-composition</a>
      <td>&lt;single-animation-composition>#
      <td>replace
      <td>all elements
      <td>no
      <td>N/A
      <td>not animatable
      <td>per grammar
      <td>list, each item a keyword as specified
   </table>
  </div>
  <h2 class="no-num no-ref heading settled" id="idl-index"><span class="content">IDL Index</span><a class="self-link" href="#idl-index"></a></h2>
<pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed②"><c- g>Exposed</c-></a>=<c- n>Window</c->]
<c- b>interface</c-> <a href="#cssanimation"><code><c- g>CSSAnimation</c-></code></a> : <a class="n" data-link-type="idl-name" href="https://w3c.github.io/web-animations/#animation" id="ref-for-animation①①"><c- n>Animation</c-></a> {
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring①⓪"><c- n>CSSOMString</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="CSSOMString" href="#dom-cssanimation-animationname" id="ref-for-dom-cssanimation-animationname①"><c- g>animationName</c-></a>;
};

[<a href="#dom-cssanimation-cssanimation"><code><c- g>Constructor</c-></code></a> (<a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/web-animations-1/#animatable" id="ref-for-animatable②"><c- n>Animatable</c-></a>? <a href="#dom-cssanimation-cssanimation-target-animationname-options-defaulteasing-target"><code><c- g>target</c-></code></a>,
              <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring②①"><c- n>CSSOMString</c-></a> <a href="#dom-cssanimation-cssanimation-target-animationname-options-defaulteasing-animationname"><code><c- g>animationName</c-></code></a>,
              <c- b>optional</c-> (<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unrestricted-double" id="ref-for-idl-unrestricted-double②"><c- b>unrestricted</c-> <c- b>double</c-></a> <c- b>or</c-> <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/web-animations-1/#dictdef-keyframeeffectoptions" id="ref-for-dictdef-keyframeeffectoptions②"><c- n>KeyframeEffectOptions</c-></a>) <a href="#dom-cssanimation-cssanimation-target-animationname-options-defaulteasing-options"><code><c- g>options</c-></code></a>,
              <c- b>optional</c-> <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring③①"><c- n>CSSOMString</c-></a> <a href="#dom-cssanimation-cssanimation-target-animationname-options-defaulteasing-defaulteasing"><code><c- g>defaultEasing</c-></code></a> = "ease"),
 <a href="#dom-cssanimation-cssanimation-target-animationname-options-defaulteasing-timeline"><code><c- g>Constructor</c-></code></a> (<a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/web-animations-1/#animatable" id="ref-for-animatable①①"><c- n>Animatable</c-></a>? <a href="#dom-cssanimation-cssanimation-target-animationname-options-defaulteasing-timeline-target"><code><c- g>target</c-></code></a>,
              <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring④①"><c- n>CSSOMString</c-></a> <a href="#dom-cssanimation-cssanimation-target-animationname-options-defaulteasing-timeline-animationname"><code><c- g>animationName</c-></code></a>,
              (<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unrestricted-double" id="ref-for-idl-unrestricted-double①①"><c- b>unrestricted</c-> <c- b>double</c-></a> <c- b>or</c-> <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/web-animations-1/#dictdef-keyframeeffectoptions" id="ref-for-dictdef-keyframeeffectoptions①①"><c- n>KeyframeEffectOptions</c-></a>) <a href="#dom-cssanimation-cssanimation-target-animationname-options-defaulteasing-timeline-options"><code><c- g>options</c-></code></a>,
              <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring⑤①"><c- n>CSSOMString</c-></a> <a href="#dom-cssanimation-cssanimation-target-animationname-options-defaulteasing-timeline-defaulteasing"><code><c- g>defaultEasing</c-></code></a>,
              <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/web-animations-1/#animationtimeline" id="ref-for-animationtimeline①"><c- n>AnimationTimeline</c-></a>? <a href="#dom-cssanimation-cssanimation-target-animationname-options-defaulteasing-timeline-timeline"><code><c- g>timeline</c-></code></a>)]
<c- b>partial</c-> <c- b>interface</c-> <a class="idl-code" data-link-type="interface" href="#cssanimation" id="ref-for-cssanimation⑤①"><c- g>CSSAnimation</c-></a> { };

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①①"><c- g>Exposed</c-></a>=<c- n>Window</c->,
 <a href="#dom-csskeyframeeffectreadonly-csskeyframeeffectreadonly"><code><c- g>Constructor</c-></code></a> (<a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring⑥①"><c- n>CSSOMString</c-></a> <a href="#dom-csskeyframeeffectreadonly-csskeyframeeffectreadonly-keyframesname-defaulteasing-keyframesname"><code><c- g>keyframesName</c-></code></a>, <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring⑦①"><c- n>CSSOMString</c-></a> <a href="#dom-csskeyframeeffectreadonly-csskeyframeeffectreadonly-keyframesname-defaulteasing-defaulteasing"><code><c- g>defaultEasing</c-></code></a>)]
<c- b>interface</c-> <a href="#csskeyframeeffectreadonly"><code><c- g>CSSKeyframeEffectReadOnly</c-></code></a> : <a class="n" data-link-type="idl-name" href="https://w3c.github.io/web-animations/#keyframeeffectreadonly" id="ref-for-keyframeeffectreadonly①①"><c- n>KeyframeEffectReadOnly</c-></a> {
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring⑧①"><c- n>CSSOMString</c-></a> <a data-readonly data-type="CSSOMString" href="#dom-csskeyframeeffectreadonly-keyframesname"><code><c- g>keyframesName</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring" id="ref-for-cssomstring⑨①"><c- n>CSSOMString</c-></a> <a data-readonly data-type="CSSOMString" href="#dom-csskeyframeeffectreadonly-defaulteasing"><code><c- g>defaultEasing</c-></code></a>;
};

</pre>
  <h2 class="no-num no-ref heading settled" id="issues-index"><span class="content">Issues Index</span><a class="self-link" href="#issues-index"></a></h2>
  <div style="counter-reset:issue">
   <div class="issue"> This differs from the behavior defined for transitions. We should
probably sort transitions first, then animation, then use the global animation
list. The reason being that when developer tools etc. hang on to orphaned
animations and transitions in order to replay them, they should maintain
roughly the same composite order.<a href="#issue-f7fefefa"> ↵ </a></div>
   <div class="issue"> Create pictures of these examples and verify they make sense.<a href="#issue-69776a9f"> ↵ </a></div>
   <div class="issue">
    <p>We need to define a constructor for <code class="idl"><a data-link-type="idl" href="#cssanimation">CSSAnimation</a></code>.
Perhaps something like the following:</p>
<pre class="idl highlight def">[<span><code><c- g>Constructor</c-></code></span> (<a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/web-animations-1/#animatable"><c- n>Animatable</c-></a>? <span><code><c- g>target</c-></code></span>,
              <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <span><code><c- g>animationName</c-></code></span>,
              <c- b>optional</c-> (<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unrestricted-double"><c- b>unrestricted</c-> <c- b>double</c-></a> <c- b>or</c-> <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/web-animations-1/#dictdef-keyframeeffectoptions"><c- n>KeyframeEffectOptions</c-></a>) <span><code><c- g>options</c-></code></span>,
              <c- b>optional</c-> <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <span><code><c- g>defaultEasing</c-></code></span> = "ease"),
 <span><code><c- g>Constructor</c-></code></span> (<a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/web-animations-1/#animatable"><c- n>Animatable</c-></a>? <span><code><c- g>target</c-></code></span>,
              <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <span><code><c- g>animationName</c-></code></span>,
              (<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unrestricted-double"><c- b>unrestricted</c-> <c- b>double</c-></a> <c- b>or</c-> <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/web-animations-1/#dictdef-keyframeeffectoptions"><c- n>KeyframeEffectOptions</c-></a>) <span><code><c- g>options</c-></code></span>,
              <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <span><code><c- g>defaultEasing</c-></code></span>,
              <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/web-animations-1/#animationtimeline"><c- n>AnimationTimeline</c-></a>? <span><code><c- g>timeline</c-></code></span>)]
<c- b>partial</c-> <c- b>interface</c-> <a class="idl-code" data-link-type="interface" href="#cssanimation"><c- g>CSSAnimation</c-></a> { };
</pre>
    <p>The difficulty is with liveness. The most useful and least magical
(but most complicated) approach is to define a subclass of <code class="idl"><a data-link-type="idl" href="https://w3c.github.io/web-animations/#keyframeeffectreadonly">KeyframeEffectReadOnly</a></code> that has the special behavior of tracking changes
to all @keyframes rules that match the supplied name and automatically
updating the set of keyframes returned by <code class="idl"><a data-link-type="idl" href="https://w3c.github.io/web-animations/#getframes">getFrames()</a></code> after filling-in the default easing.</p>
    <p>Something like,</p>
<pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed"><c- g>Exposed</c-></a>=<c- n>Window</c->,
 <span><code><c- g>Constructor</c-></code></span> (<a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <span><code><c- g>keyframesName</c-></code></span>, <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <span><code><c- g>defaultEasing</c-></code></span>)]
<c- b>interface</c-> <span><code><c- g>CSSKeyframeEffectReadOnly</c-></code></span> : <a class="n" data-link-type="idl-name" href="https://w3c.github.io/web-animations/#keyframeeffectreadonly"><c- n>KeyframeEffectReadOnly</c-></a> {
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <span data-readonly data-type="CSSOMString"><code><c- g>keyframesName</c-></code></span>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://drafts.csswg.org/cssom-1/#cssomstring"><c- n>CSSOMString</c-></a> <span data-readonly data-type="CSSOMString"><code><c- g>defaultEasing</c-></code></span>;
};
</pre>
     <a href="#issue-d6d52499"> ↵ </a>
   </div>
  </div>
  <aside class="dfn-panel" data-for="owning-element">
   <b><a href="#owning-element">#owning-element</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-owning-element">2.1. Owning element</a> <a href="#ref-for-owning-element①">(2)</a> <a href="#ref-for-owning-element②">(3)</a> <a href="#ref-for-owning-element③">(4)</a> <a href="#ref-for-owning-element④">(5)</a> <a href="#ref-for-owning-element⑤">(6)</a>
    <li><a href="#ref-for-owning-element⑥">2.2. Animation composite order</a> <a href="#ref-for-owning-element⑦">(2)</a> <a href="#ref-for-owning-element⑧">(3)</a> <a href="#ref-for-owning-element⑨">(4)</a> <a href="#ref-for-owning-element①⓪">(5)</a> <a href="#ref-for-owning-element①①">(6)</a> <a href="#ref-for-owning-element①②">(7)</a> <a href="#ref-for-owning-element①③">(8)</a> <a href="#ref-for-owning-element①④">(9)</a>
    <li><a href="#ref-for-owning-element①⑤">3.1.1. Interaction between animation-play-state and the Web Animations API</a> <a href="#ref-for-owning-element①⑥">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="propdef-animation-composition">
   <b><a href="#propdef-animation-composition">#propdef-animation-composition</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-animation-composition">3.2. The animation-composition property</a> <a href="#ref-for-propdef-animation-composition①">(2)</a> <a href="#ref-for-propdef-animation-composition②">(3)</a> <a href="#ref-for-propdef-animation-composition③">(4)</a> <a href="#ref-for-propdef-animation-composition④">(5)</a> <a href="#ref-for-propdef-animation-composition⑤">(6)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-single-animation-composition">
   <b><a href="#typedef-single-animation-composition">#typedef-single-animation-composition</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-single-animation-composition">3.2. The animation-composition property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="interval-start">
   <b><a href="#interval-start">#interval-start</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-interval-start">4.1. Event dispatch</a> <a href="#ref-for-interval-start①">(2)</a> <a href="#ref-for-interval-start②">(3)</a> <a href="#ref-for-interval-start③">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="interval-end">
   <b><a href="#interval-end">#interval-end</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-interval-end">4.1. Event dispatch</a> <a href="#ref-for-interval-end①">(2)</a> <a href="#ref-for-interval-end②">(3)</a> <a href="#ref-for-interval-end③">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="elapsed-time">
   <b><a href="#elapsed-time">#elapsed-time</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-elapsed-time">4.1. Event dispatch</a> <a href="#ref-for-elapsed-time①">(2)</a> <a href="#ref-for-elapsed-time②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="cssanimation">
   <b><a href="#cssanimation">#cssanimation</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-cssanimation">2.1. Owning element</a>
    <li><a href="#ref-for-cssanimation①">2.2. Animation composite order</a> <a href="#ref-for-cssanimation②">(2)</a>
    <li><a href="#ref-for-cssanimation③">5.1. The CSSAnimation interface</a> <a href="#ref-for-cssanimation④">(2)</a> <a href="#ref-for-cssanimation⑤">(3)</a>
    <li><a href="#ref-for-cssanimation⑥">5.2. Requirements on pending style changes</a> <a href="#ref-for-cssanimation⑦">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-cssanimation-animationname">
   <b><a href="#dom-cssanimation-animationname">#dom-cssanimation-animationname</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-cssanimation-animationname">5.1. The CSSAnimation interface</a>
   </ul>
  </aside>
<script>/* script-dfn-panel */

document.body.addEventListener("click", function(e) {
    var queryAll = function(sel) { return [].slice.call(document.querySelectorAll(sel)); }
    // Find the dfn element or panel, if any, that was clicked on.
    var el = e.target;
    var target;
    var hitALink = false;
    while(el.parentElement) {
        if(el.tagName == "A") {
            // Clicking on a link in a <dfn> shouldn't summon the panel
            hitALink = true;
        }
        if(el.classList.contains("dfn-paneled")) {
            target = "dfn";
            break;
        }
        if(el.classList.contains("dfn-panel")) {
            target = "dfn-panel";
            break;
        }
        el = el.parentElement;
    }
    if(target != "dfn-panel") {
        // Turn off any currently "on" or "activated" panels.
        queryAll(".dfn-panel.on, .dfn-panel.activated").forEach(function(el){
            el.classList.remove("on");
            el.classList.remove("activated");
        });
    }
    if(target == "dfn" && !hitALink) {
        // open the panel
        var dfnPanel = document.querySelector(".dfn-panel[data-for='" + el.id + "']");
        if(dfnPanel) {
            dfnPanel.classList.add("on");
            var rect = el.getBoundingClientRect();
            dfnPanel.style.left = window.scrollX + rect.right + 5 + "px";
            dfnPanel.style.top = window.scrollY + rect.top + "px";
            var panelRect = dfnPanel.getBoundingClientRect();
            var panelWidth = panelRect.right - panelRect.left;
            if(panelRect.right > document.body.scrollWidth && (rect.left - (panelWidth + 5)) > 0) {
                // Reposition, because the panel is overflowing
                dfnPanel.style.left = window.scrollX + rect.left - (panelWidth + 5) + "px";
            }
        } else {
            console.log("Couldn't find .dfn-panel[data-for='" + el.id + "']");
        }
    } else if(target == "dfn-panel") {
        // Switch it to "activated" state, which pins it.
        el.classList.add("activated");
        el.style.left = null;
        el.style.top = null;
    }

});
</script>